US police officers carried BB guns to plant on unarmed suspects after they shot them, a corruption trial has heard.

Members of Baltimore Police Department’s Gun Trace Task Force, an elite squad with responsibility for taking illegal firearms off the city’s streets, kept replica weapons in their cars in case they “accidentally hit somebody,” a former detective told a court.

Maurice Ward, who served with the unit, made the claim as he gave evidence during the trial of two colleagues accused of crimes including robbery, extortion, drug-dealing and faking evidence.

Ward is one of six officers who have pleaded guilty to fraud and racketeering charges.

He told the US District Court in Baltimore the unit’s supervisor, Sergeant Wayne Jenkins, instructed officers to carry BB guns “in case we accidentally hit somebody or got into a shoot-out, so we could plant them”.

Ward did not say if officers ever did plant a replica firearm on anyone, the Baltimore Sun reported.

He is one of four officers giving testimony in the trial of detectives Daniel Hersl and Marcus Taylor, who have denied the charges.

The trial has heard how the officers from the rogue unit plundered money and drugs from suspects to sell on themselves. They stopped people on the streets without probable cause, broke into homes, and executed searches without warrants, it was alleged.

Officers also installed illegal GPS trackers on suspects on suspects cars to make them easier to track, the court heard.

In one case, police broke into a safe without a warrant and found $200,000 (£140,500) inside. They took out half the cash and closed the safe before filming themselves pretending to open it for the first time.

“We would create false reports to cover up the robberies we were involved in,” testified Evodio Hendrix, another of the officers who has admitted the charges.

Detectives Momodu Gondo and Jemell Rayam and Sergeant Thomas Allers have also pleaded guilty.

Officers from the unit also fraudulently pocketed hundreds of thousands of pounds from overtime they did not work

Close to 'The Wire' on the mean streets of Baltimore Show all 6 1 /6 Close to 'The Wire' on the mean streets of Baltimore Close to 'The Wire' on the mean streets of Baltimore A view of the Baltimore skyline at night Close to 'The Wire' on the mean streets of Baltimore A view of Baltimore Close to 'The Wire' on the mean streets of Baltimore A view of Baltimore Close to 'The Wire' on the mean streets of Baltimore Street wise: scene from 'The Wire' Close to 'The Wire' on the mean streets of Baltimore Andy Lynes with actor Robert F Chew Close to 'The Wire' on the mean streets of Baltimore Andy Lynes with actor Robert F Chew

Five of those who have admitted their crimes faces up to 20 years in prison.

Jenkins could be jailed for up to 30 years for leading the corrupt squad. The trial has heard he carried brass knuckles, a machete and a grappling hook in case he encountered a “monster” dealer to rob.

Jenkins has admitted writing a false report about heroin planted in a car in 2010 following a high-speed police chase that killed an elderly bystander. Two men in the car spent years in prison because of the planted drugs before the corruption emerged.

The unit’s illegal activity was uncovered in 2016 when Drug Enforcement Administration investigators heard an officer talking to a drug dealer on wiretap.

Only one officer of the nine-man unit, Detective John Clewell, has not been charged with any crime.

The trial continues.