A man who escaped police custody and had been on the lam since before the New Year was finally caught Saturday.

NYPD sources say Amtrak police recognized 31-year-old Daniel Ortiz as he was walking near Penn Station at 33rd Street and 8th Avenue a little after 7 a.m.

When cops approached him, sources say he identified himself and was taken back into custody without incident.

Back on December 29, Ortiz sneaked away while under police guard at Lenox Health Center on 7th Avenue between 12th and 13th Street.

He was wearing shackles at the time but sources say he was found without them.

Ortiz is now charged with escape.

Officer Albert Bercher was supposed to be watching Ortiz but left the room to use his cell phone.

Bercher has been suspended.