The Metropolitan Police has agreed a final settlement with an officer it discriminated against.
Firearms officer Carol Howard, 35, was "singled out and targeted" for nearly a year, a panel ruled last year. She has now decided to leave the police.
The Met said it "deeply regrets" the impact of the discrimination.
Ms Howard, of Purley, south London, brought a claim of discrimination at the Central London Employment Tribunal in 2014.
Her lawyer Kiran Daurka, of Slater and Gordon, said: "Carol is sad to leave the Metropolitan Police but her legacy to fellow officers is that her case has now led to a serious and thorough review of the way in which the MPS deals with discrimination complaints from officers."
In a statement, the Met said it "deeply regrets the impact the discriminatory conduct had on PC Howard, and wants to stress there is no room in the MPS for racism and sexism or victimisation".
The Met said it had agreed a final settlement against the officer's existing legal claims.
The force added that in September 2014 it said it would fully support Ms Howard's return to work, but after recent discussions it became clear she did not wish to continue her career with the Met.
The Met said: "The MPS respects PC Howard's decision and wishes her well in the future."
'Directly discriminated against'
During the hearing last year, the panel was told that an internal report had been deliberately rewritten ahead of the tribunal.
An officer was asked to delete references in the report into discrimination related to race or sex, the panel said.
A judgement issued by the panel which heard the case said the Met "directly discriminated" against Ms Howard "on the grounds of sex and race" between 31 January and 29 October 2012.
A number of Ms Howard's complaints of "victimisation" were "well-founded", the tribunal added.
The 35-year-old had worked in the Diplomatic Protection Group (DPG), which provides protection for foreign embassies and missions in London.
Her superior, acting Insp Dave Kelly, subjected her to "a course of conduct which was detrimental to her", the panel said.
The panel also found that the Met also tried to "deflect" negative press by releasing information about Ms Howard.
While the force did not name PC Howard in a press statement, a draft version was altered to include more detail about her three arrests linked to a domestic dispute with her estranged husband.
After the tribunal last September Ms Howard received £37,000.