St. Louis County, Missouri, agreed to pay out a $10.25 million settlement to a police lieutenant who said he was ordered to “tone down” his “gayness” and was passed over for a promotion 23 times.

The St. Louis Post-Dispatch reported that the agreement between the county and Keith Wildhaber was finalized on Monday, within hours of St. Louis County Police Chief Jon Belmar’s retirement announcement after six years of being on the job.

County officials said they were unsure how much of the settlement would be covered under insurance policies and how much would be paid for by the taxpayers. But county officials did say the settlement money would not come out of the Proposition P public safety tax.

Belmar gave Wildhaber a promotion to lieutenant in December, putting him in charge of a newly-created diversity and inclusion unit.

Wildhaber was also awarded nearly $20 million by a jury in St. Louis County Circuit Court on October 23 after testimony revealed that his superiors passed him over for promotion 23 times and he was transferred to a precinct far from his home out of retaliation for filing a complaint with the U.S. Equal Employment Opportunity Commission.

“This lawsuit acknowledges what Lt. Wildhaber survived in the police department and lets us move forward as a county,” County Executive Sam Page said on Monday. “I think it’s important to recognize that this sends a message to everyone in county government and to all of our employers in the St. Louis region, that discrimination will not be tolerated.”