MOUNT HOPE, N.Y. (CBNewYork/AP) — Authorities said they’ve charged two New York City men with shooting an ex-inmate within minutes of his release from prison.

State police said they arrested Jerome Mack and Edgar Wilson, both 35, in Manhattan around 5 p.m. Thursday, about seven hours after a 33-year-old man was shot in the Orange County town of Mount Hope.

Police said the victim was shot about 15 minutes after being released from the nearby medium-security Otisville state prison, where he served a 15-year sentence for assault.

The New York City man managed to get to a nearby Metro-North train station, where someone called 911. Police said he underwent surgery at Westchester Medical Center. His name and information on his condition haven’t been released.

Police said the man had intended to take a train back to Manhattan but was offered a ride at the last minute.

“At some point when these gentlemen arrived, he ended up opting to take a ride with them as opposed to getting a ride from the prison officials to get on the train,” said Mount Hope town police Chief Paul Rickard.

Mack and Edgar are jailed on attempted murder charges.

Check Out These Other Stories From CBSNewYork.com:

(TM and © Copyright 2014 CBS Radio Inc. and its relevant subsidiaries. CBS RADIO and EYE Logo TM and Copyright 2014 CBS Broadcasting Inc. Used under license. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed. The Associated Press contributed to this report.)