An officer is taking Police Scotland to an employment tribunal alleging sexism against female firearms officers.
Rhona Malone, 43, from West Lothian, claims she was subjected to a series of sexist comments and behaviour by inspectors which amounted to institutional sexism.
At a preliminary hearing in Edinburgh her lawyer said female firearms officers were "set up to fail".
Police Scotland denies the claim and the case is ongoing.
It is due to come to a full employment hearing early next year.
Ms Malone, a firearms officer based in Edinburgh, claimed she was discriminated against repeatedly at work because she was a woman.
She alleged there was a culture of institutionalised sexism at the Police Scotland firearms unit where women are ''set up to fail'' particularly if they question how things work.
She claimed she received a string of sexist remarks from officers including an email in which an inspector wrote he did not want to see two female officers deployed together. She said he later apologised.
Her lawyer said this was a ''blatant and overtly discriminatory email from someone who ought to have known better''.
A preliminary employment tribunal hearing in Edinburgh earlier heard claims a female chief inspector laughed at Ms Malone when she raised her concerns describing them as ''petty''.
She claims there is a general culture of sexism and discrimination at the force and there are failures in the way the police handle grievances.
She is also claiming her complaints were not treated properly.
She claimed the discrimination was still going on as the professional standards department of the police had failed to investigate the grievances over the last 10 months.