A man who was charged with a list of felonies last year and detained for months at the Cook County Jail filed a federal lawsuit on Tuesday claiming he was framed by a pair of Chicago police officers who have been indicted for allegedly stealing cash and drugs from properties they raided.

On May 13, 2017, 28-year-old Victor Rosas was sitting in a parked vehicle in the 2300 block of West 18th Place when Sgt. Xavier Elizondo and Officer David Salgado ordered him to get out, according to the suit filed Tuesday in U.S. District Court.

Elizondo, Salgado and other unnamed officers searched the car and took Rosas into custody, according to the suit. They told Rosas they would let him go if he agreed to become an informant, but he refused.

Federal charges were filed last month against Elizondo and Salgado, who were both assigned to an Area Central gang team in the Ogden District. Prosecutors have alleged that they submitted false affidavits to judges in order to obtain search warrants to steal cash and drugs, sharing some of the proceeds with informants who tipped them off to stash houses.

In his suit, Rosas claims the officers wrote bogus police reports and that Salgado lied to a grand jury to secure an indictment against Rosas.

Rosas was charged with aggravated unlawful use of a weapon by a felon, armed habitual criminal and possession of a firearm without a valid FOID card, court records show. He couldn’t afford to pay bond, so he was held at the jail for more than nine months, the suit says.

Cook County prosecutors dropped the charges against Rosas on Feb. 21.

The five-count suit accuses the officers of false arrest, unlawful detention and conspiracy, and it claims they violated Rosas’ Fourth Amendment rights. The suit also accuses the city of Chicago of failing to properly investigate claims of police misconduct. He is seeking an unspecified amount in damages.

Chicago police officials don’t comment on pending litigation. City officials did not immediately return messages seeking comment.