An NYPD detective with six years on the job was in a medically-induced coma Sunday following a weekend subway attack, police said.

The 29-year-old off-duty detective was at the 23rd Street 6 train station with his cousin at about 6:30 p.m. Saturday, said a law enforcement official. They were waiting on the southbound platform when a man, described as 5-feet-9-inches and about 200 pounds, punched him in the face, causing him to fall to the ground and hit his head.

His attacker, believed to be a homeless man in his 40s, was still on the loose, said the official. The man quickly fled with two women, police said.

The officer was taken to Bellevue Medical Center where he was put into a medically-induced coma with bleeding in the brain, police said.