For the third time in a week, a prisoner in NYPD custody pulled a Harry Houdini – this time disappearing from a Brooklyn hospital early yesterday morning.

Unlike the previous two escape artists – murder suspect Maxie Dacosta Jr., 27, and robbery suspect Ezekiel Edwards, 17 – who remain at large, Frank Luongo, 46, was captured about two hours after he allegedly fled from Long Island College Hospital in Cobble Hill.

Luongo had been arrested at 6:30 p.m. Sunday in East New York, on charges of possession of a controlled substance, resisting arrest and carrying an open container of beer, sources said.

After being taken to Central Booking for processing, he complained he needed medication for a prior injury, and was taken to the hospital on Hicks Street in handcuffs. At about 1 a.m. yesterday, after Luongo was given his medication, he told a cop guarding him that he had to go to the bathroom, a police source said.

When the officer unshackled one of Luongo’s wrists, the prisoner wheeled around and struck the cop then bolted through the hospital’s locked glass doors, police said.

“He rammed the doors with his shoulder and caused them to shatter,” the police source said.

At about 3 a.m., two cops spotted Luongo at Pitkin Avenue and Herzl Street, which led to a brief chase. He was found hiding under a car.

NYPD spokesman Paul Browne said that the department “takes seriously the escape of a single prisoner,” but noted that the escapes represent “1/5,000th of 1 percent” of the 275,000 arrests made this year.