IOWA CITY — Authorities investigating the 2009 Iowa City shooting death of John Versypt of Cordova, Ill., had their man, and it wasn’t Justin Marshall, his defense attorney told jurors Wednesday during opening statements in Marshall’s murder trial.

“Their investigation led to Charles Thompson,” defense attorney Thomas Gaul said. “But the state misfired, and that case ended in a mistrial.”

Thompson was the first person to be charged with first-degree murder in connection with Versypt’s death. But his case ended in a mistrial, and he pleaded guilty to a lesser misdemeanor charge that will set him free with time served.

As part of the plea agreement, Thompson agreed to testify against Marshall during his trial, which began Tuesday and is expected to last two weeks. Gaul warned the 16-member jury on Wednesday to be wary of testimony offered for compensation.

“Charles Thompson has an incentive to testify against Marshall,” Gaul said, adding that he and other jailhouse witnesses expected to take the stand “don’t care about justice. They want time off their sentence. And that is what this case is about.”

But prosecutors presented a different argument during opening statements. Assistant County Attorney Meredith Rich-Chappell said Marshall spoke with police on multiple occasions after the Oct. 8, 2009, shooting at the Broadway Condominiums in south Iowa City, and he made statements incriminating Thompson.

“Justin Marshall told officers that Charles Thompson came in with a black ski mask, and he told officers where the mask was,” Rich-Chappell said. “This was a red herring that Justin Marshall gave to officers.”

Marshall eventually confided with some inmates, while being held on separate charges, about his involvement in the shooting, Rich-Chappell said. And those inmates, folks he trusted, are prepared to testify during his trial, she said.

“We will put together evidence that shows Marshall tried to rob Versypt that day, and it went very badly,” she said. “He shot and killed John Versypt for the rent money he thought he had.”

Versypt, according to police, was a landlord for units in the Broadway Condominiums and was checking on his properties when he was shot in the head during an attempted robbery.

Thompson, 20, was the first person to be arrested in the case in February 2010, followed by Marshall, 22, in July 2011 and Courtney White, 25, in October 2011.

White, who also faces a first-degree murder trial, is set to be tried May 1.

If convicted, Marshall and White face life sentences in prison.