Speaking in halting sentences and with visible reluctance, former Philadelphia police inspector Daniel Castro pleaded guilty Thursday to conspiracy to commit extortion, avoiding a retrial.

His plea in U.S. District Court came less than two months after a jury in his trial deadlocked on most of the charges against him.

Federal prosecutors had planned to retry the case over the summer but they agreed to drop the remaining charges, which included additional counts of extortion, in exchange for Castro's plea.

Castro, believed the highest-ranking police officer to be criminally charged in decades, was indicted last year on allegations that he schemed to hire enforcers to use threats and violence to recoup $90,000 he had lost in a failed business deal.

"He decided it was better for him to plead guilty rather than go through the retrial," Assistant U.S. Attorney Louis D. Lappen said after Thursday's hearing.

Castro, 47, will be sentenced in September. He faces a maximum penalty of 25 years in prison, but his attorney, Brian McMonagle, said he expected the sentence would be closer to two or three years.

"Today was a big step," McMonagle said. "It was a way to put this behind him."

In a statement, Castro expressed gratitude to the jury who heard his case in April.

"I accept responsibility for my conduct and will work every day to restore my reputation," Castro said. "I have lost a career that I cherished, but I now begin the process of rebuilding my life."

No enforcers were hired, but the FBI led Castro to believe the collectors were going to the debtor's home, threatening him, and roughing him up.

During his trial, Castro admitted his involvement in the plan, but insisted the government entrapped him by using an informant to talk him into it. In impassioned testimony, he broke down in tears several times and expressed anger toward federal authorities.

The jury deadlocked, 10-2, in favor of acquittal on eight of the 10 counts against him, with one juror saying she did not think the case should have been tried. Castro was convicted of lying to the FBI during the investigation and acquitted of one extortion charge.

On Thursday, Castro pleaded guilty to conspiracy to interfere with interstate commerce by extortion, a charge stemming from the fact that he referred the services of the "collectors" to an acquaintance who was also seeking help recouping a debt. At the time, prosecutors said, Castro believed the collectors were using threats and violence to get the money.

A key component to the plea agreement was that prosecutors will drop a charge of honest-services wire fraud, McMonagle said. Prosecutors alleged that Castro used a police computer to look up information for someone in exchange for a flat-screen television, an accusation he vehemently denied.

"One of the most important things to Dan was to prove to all that he never used his office to derive any benefit, and we proved that in trial," McMonagle said. "This was a personal situation. It didn't involve the Police Department . . . and that was a very, very important part of what took place today."

That charge was the only allegation involving Castro's position in the department, meaning he will likely retain his pension. Castro has been receiving a monthly pension of $4,795.04 since shortly after his arrest in November, according to Francis X. Bielli, executive director of the city Board of Pensions and Retirement.

Police Commissioner Charles H. Ramsey said he was glad the proceedings were over so the department could move on.

"It's unfortunate," Ramsey said. "A man with a promising career, and he threw it all away."