The ex-convict came under investigation in 2015 after being released from prison because police suspected he was selling drugs from an Oklahoma City apartment. Police also believed he was in a street gang.

The city council agreed in January to pay the settlement for Sgt. Keith Medley because he "was acting within the scope of his employment at all times relevant to this action."

Oklahoma City has paid $18,000 to settle a federal lawsuit against a police sergeant over an illegal search.

Gaines was charged in 2015 in a federal indictment with possession of cocaine and marijuana with intent to distribute. Police reported finding the drugs Feb. 25, 2015, during a search of the apartment.

A federal judge, though, threw out that evidence after concluding Medley made false and misleading statements in his written request for the search. Federal prosecutors dropped the indictment in 2016 because of the ruling and Gaines was released from jail.

The federal judge wrote Medley "was recklessly indifferent to the falsity of material statements in his affidavit and the misleading effect of his omissions of certain true facts."

Gaines sued Medley a year ago in Oklahoma City federal court. A tentative settlement — for $18,000 — was reached in November. Medley then asked his employer, the city, to cover that amount. A federal judge last month signed off on the settlement after the city council agreed to pay, without admission of liability.