A man attempting to do a good deed for a person in need ended up being the victim of a crime when the person he stopped to help pulled a gun and took off with his car.

The good Samaritan pulled into the McDonald’s at 407 15th Avenue SE. near the University of Minnesota around 11:30 p.m. Sunday when he was approached by a man asking for a ride to a bus stop and $5 for bus fare. The Samaritan went the extra mile and offered to buy the man food, too.

When he pulled out his wallet, the man produced a gun, stuck it into his side and tried to take all of his money, said Minneapolis police Sgt. Catherine Michal.

The Samaritan got out of his car, walked to the passenger’s side and attempted to pull the gunman out of the car. That’s when the crook slid over to the driver’s side and took off, a police report said.

The victim tried to stop the man and jumped onto the hood of the car. The suspect swerved the vehicle as he drove out of the parking lot until the victim fell off, Michal said. The victim was taken to Hennepin County Medical Center.

Camera footage captured the suspect heading west on SE. 5th Street. The vehicle was later recovered in Edina, Michal said.