A 33-year-old man was shot after getting out of state prison on Thursday as he headed back to New York City, said New York State Police Captain Pierce Gallagher.

The man, who was not identified, was released from the Otisville Correctional Facility on parole at about 9:45 a.m. after serving 15 years for first-degree assault, Gallagher said. He got into a vehicle with a man, who officials do not believe he knew, and about 15 minutes later was shot in the chest and arm.

Gallagher said a second man was believed to be inside the vehicle and shot the victim.

The man then ran to a nearby Metro North station, about two hours from New York City, and flagged down someone for help. He was taken to Westchester Medical Center and is expected to survive, Gallagher said.

Authorities believe the second man in the car, thought to be the shooter, and the victim knew each other.