A man who helped a stranger who asked for a ride was rewarded Friday by being robbed. But the robber’s getaway literally ran out of gas, authorities said.

It started before 1 a.m. at Mary Washington Hospital in Fredericksburg, where the victim had just visited a friend, said Lt. Troy Skebo of the Spotsylvania County Sheriff’s Office. When a stranger said he needed a ride to the county after visiting a relative, the man agreed to help, Skebo said.

He drove to a convenience store on Route 1 five miles south of the hospital and went into the store. But as he returned to his car, the stranger assaulted and robbed him, Skebo said.

The robber then got into the passenger seat of another vehicle that was parked there and drove off.

The victim called 911 and followed in his car for about 10 miles before losing sight of the vehicle. But deputies kept searching, Skebo said.

He said they found the vehicle about 15 miles from the store, out of gas, with blinkers on. Two men were arrested, authorities said.