Two Baltimore police detectives were convicted of racketeering and robbery Monday in a trial that is part of a continuing federal investigation into corruption among rogue members of the city’s beleaguered police force.

Detectives Daniel Hersl and Marcus Taylor were shackled and led out of the courtroom after the verdict was read.

Federal jurors deliberated for two days after hearing nearly three weeks of testimony centered on details of police wrongdoing. The jury was released late Thursday afternoon after a few hours and returned to their deliberations Monday morning.

The two detectives faced robbery, extortion and racketeering charges that could land them up to life in prison. They were convicted of racketeering and robbery under the Hobbs Act, which prohibits interference with interstate commerce, but were cleared of possessing a firearm in pursuance of a violent crime.

William Purpura, Mr. Hersl’s lead attorney, said the family was disappointed in the verdict but noted that the jury “did acquit him of one of the more serious crimes.”

Acting Police Commissioner Darryl DeSousa said in a statement that the department will move to fire Mr. Hersl and Mr. Taylor, who have been suspended with pay since being indicted in March.

“We recognize that this indictment and subsequent trial uncovered some of the most egregious and despicable acts ever perpetrated in law enforcement,” Mr. DeSousa said.

The trial in a federal courthouse has been dominated by testimony of four ex-detectives who worked alongside the defendants in an elite unit known as the Gun Trace Task Force.

The defense teams for Mr. Hersl and Mr. Taylor had asked jurors to question the motivations of their disgraced ex-colleagues and various other government witnesses, including convicted drug dealers.