Investigators sweeping a jail after breaking up a drug smuggling ring uncovered an inmate's apparent escape plot using 64 neatly tied together bedsheets, enough for him to shimmy down 11 stories from his cellblock to the street, city officials said Thursday.

Ernest Murphy, awaiting trial on an attempted murder charge, had the sheets stashed under a sink in his cell at the Manhattan Detention Center, said Mark Peters, commissioner of the New York City Department of Investigation. The coil stretched the length of a gymnasium nearly four times.

"Thankfully, it was discovered before he had an opportunity to test his skills at making a getaway," Peters said. "And so the city was spared the potential spectacle of joining the state for the past two weeks in a manhunt for escaped inmates."

Peters was referring to the massive search for convicted murderers David Sweat and Richard Matt, who authorities believe used power tools smuggled in by a worker at the maximum-security Clinton Correctional Facility in Dannemora to break through a wall, cut a hole through a pipe and vanish nearly two weeks ago.

Murphy, already jailed on allegations he participated in a gang assault where a man was slashed and shot, was arrested May 11 on a new charge of promoting prison contraband. He didn't confess to an escape attempt, but authorities said there's no other logical reason for the sheets. A message left with his lawyer wasn't immediately returned.

Peters and Manhattan District Attorney Cyrus R. Vance Jr. said the arrest came after a months-long investigation into contraband smuggled inside and out of the jail, located next door to Manhattan Criminal Court and used mostly for holding prisoners ahead of court dates. An undercover officer posed as an inmate wanting to smuggle contraband, and the probe included wiretaps.

"We have all witnessed in recent weeks the serious consequences that can result when contraband is smuggled inside prison walls," Vance said.

City Correction officer Patricia Howard, 44, was arrested May 9 on a Harlem street in her uniform, holding a bag of contraband that included drugs, lighters and flashlights, and $800 — her cut of the operation, officials said. She is awaiting arraignment and it isn't immediately clear who represents her.

Howard has been a correction officer for nearly 20 years, and investigators said she had more than 2,400 calls to inmates during her tenure and even received a thank-you note from an inmate for supporting "the jail shopping network."

She walked into the jail with the contraband and then handed it over to inmate Tommy Davis, there on an attempted murder charge, who would disseminate it to other inmates in the jail, authorities said. Davis used his sister and niece to get the orders filled outside the jail, authorities said. The four were charged with crimes including promoting prison contraband, attempted sale of a controlled substance and bribery.

The search of prison cells also turned up a blade, a pen with a sharpened tip, marijuana and a scale for weighing drugs, officials said. The investigation continues.