A man risked his life when he made a split-second decision to stop an alleged robber from stealing a car.