Tasked with taking guns off the streets, Prince George’s County Police Detective Juan Carter instead stole and sold them, prosecutors said Monday. When investigators were tipped to his scheme, he made efforts to throw them off, prosecutors said.

The accusations were made Monday during opening statements in Carter’s trial in Prince George’s County Circuit Court. Though prosecutors did not fully lay out the evidence they have, they accused Carter of profiting by selling the very shotguns, machine guns and handguns he was assigned to take away from criminals.

“He was a man who was a gun dealer on the streets with a badge,” prosecutor Jonathon Church told jurors.

Carter was indicted in 2010 on 13 counts of misconduct in office and theft. The Prince George’s County narcotics detective was a member of a state task force that worked to take guns from criminals, and prosecutors said in court Monday he was specially tasked — because of his rank — with logging some of the evidence the task force seized.

At one point, more than 20 guns the task force had taken were missing, authorities have said. Those guns, sources have said, were traceable in some way to Carter.

One of them was used in the September 2009 shooting of off-duty Officer Eric Horne when two men tried to car-jack his vehicle, authorities have said.

Prosecutors did not say in opening statements how many guns they allege were taken.

Douglas Wood, Carter’s defense attorney, said his client did not steal the weapons. He said that Carter was a good, aggressive officer but that his paperwork, and that of others on the task force, was sometimes sloppy.

Carter made $80,000 to $90,000 a year and lived comfortably with his wife in Bowie, so he had no financial motive to sell seized guns, Wood said.

“In a sense, they’re trying to make him a fall guy for some things that happened,” he said.

Carter was suspended with pay in 2009 while internal affairs detectives investigated the weapons’ disappearance, then suspended without pay after his 2010 indictment. He remains suspended without pay, said Cpl. Mike Rodriguez, a Prince George’s County police spokesman.

The task force, which according to state records seized nearly 430 guns from its inception in 2007 to September 2009, has been disbanded, authorities have said.

Church said detectives first began investigating Carter in 2009, when some guns that were supposed to have been seized turned up on the streets. The prosecutor said that Carter made excuses when questioned about the weapons, and at least one computer zip drive containing seizure records was destroyed.

“For a while, the defendant got away with it,” Church said. “He thought nobody was watching, but it caught up to him.”

Carter’s trial is expected to last at least two more days.

Prosecutors and defense attorneys questioned two witnesses Monday — an internal affairs investigator and a task force commander. Woods’s questions focused on imperfect record-keeping and evidence collection by task force members and investigators, while prosecutors tried to demonstrate the correct procedure for processing seized guns.