PC Rhona Malone, 45, took legal action against Police Scotland claiming she was discriminated against and victimised by senior officers.
Her Inspector, Keith Warhurst referred to a colleague's pregnant partner as "a right fat b***h", told a Sergeant, "you are going to end up f***ing that" when referring to a female officer and posted topless pictures of women on a WhatsApp group of officers, the tribunal ruled.
Another female officer who had quit over sexism told the Edinburgh employment tribunal that the chief firearms instructor for the team said women should not be armed officers "because they menstruated and this would affect their temperament".
She added the firearms unit was an "absolute boys club" with a "horrific" culture.
When Sergeant Rachel Coates asked the same instructor if women armed officers could wear trousers and a top instead of a one piece so they did not have to take off their gun belts and armour to go to the toilet she was told to "f**k off".
In one particular incident after mum of three Ms Malone joined the unit which only had one other female officer, Insp Warhurst said he did not want two female officers to patrol together for the "balance of testosterone".
Two months later after being promoted to temporary inspector, Mr Warhurst posted images of topless women on the teams' WhatsApp group, in which another sergeant Richard Creanor told him these images were inappropriate.
In March 2017, Keith Warhurst told Sergeant Richard Creanor talking about PC Zara Taylor "you are going to end up f***ing that" .
In an email sent on January 10, 2018, Mr Warhurst sent an email to Ms Malone's manager, Inspector Alan Finlay, and copied her in along with another female PC stating women should not pair up together on patrol for "operational reasons".
He wrote: "Guy I am going to plunge in with both feet and open myself up to being accused of being sexist!
"For operational reasons I don't want to see 2 x female officers deployed together when there are sufficient male staff on duty.
"This is based upon my experience in the firearms and routine policing environment, other than the obvious differences in physical capacity, it makes more sense from a search, balance of testosterone perspective.
"It is not a reflection on either Rhona or Freya! If you want to discuss my door is open."
Four out of the five sergeant armed officers in the team complained to Chief Inspector Linda Russell about what was written in the email.
Ms Russell told the court she said to Mr Warhurst that she was "extremely disappointed in him" and Superintendent Steven Irvine was said to be furious about the email, which he considered to be "overtly sexist".
Sergeant Coates told the tribunal he was "angry and horrified" at the email and that discussions with other female officers showed they were "really annoyed, flabbergasted and gobsmacked".
Ms Malone - a single parent with three children - also gave evidence that she was "shocked and upset" by the email.
During a "heated" meeting Ms Malone, who has since retired due to ill health, expressed her shock at the "offensive and sexist" message.
But Mr Warhurst tried to justify his words on the basis of "method of entry", referring to the physical force needed when an officer breaks down doors.
Inspector Findlay then threatened to review her operational fitness and potentially have her withdrawn from the firearms team because she was not acting in a "calm, restrained and controlled manner".
Keith Warhurst was not given the same ultimatum, the tribunal heard.
Chief Inspector Russell also suggested Ms Malone be transferred to Stirling or Maddiston for "welfare reasons" as it was nearer to her home in West Lothian.
But she refused as she felt it would imply that she had done something wrong and she wanted to return to the team.
She was a police officer in Bathgate and Livingston from June 9, 2009, until April 2, 2020, when she retired on grounds of ill health.
During her career Ms Malone was runner-up Probationer of the Year in 2011.
During a meeting on March 2, Mr Warhurst apologised and all parties considered the matter closed, until Ms Malone's grievance report was still processed without her knowledge.
And when it was finally published she was unhappy with the fourth and final version of the report as elements of her complaint were not addressed and at no point did any of the four versions state the email was sexist and discriminatory.
In February 2018 Ms Malone was withdrawn from the firearms team after being signed off sick by her GP due to stress.
After a phone call with an occupational health advisor on April 9 she was told she could have her gun licence reinstated without a GP appointment. But Mr Warhurst then ordered a GP report, despite not being her line manager.
It was this delay that was partly behind her transferring from the department two weeks later.
When she raised further complaints she was referred to the Professional Standards Department - something the tribunal considered "unsatisfactory".
But when the matter was passed to that department, it was not picked up by Chief Superintendent Andrew McDowall and addressed because he "receives thousands of emails" and he "dropped the ball".
The tribunal ruled that Ms Malone's claims of victimisation was successful as the Professional Standards Department failed to investigate her complaints.
But her claim of direct discrimination was dismissed because the changes to patrols were only a suggestion made by Inspector Warhurst and were not actually implemented by senior officers.
Employment Judge Jane Porter said in her judgment published this week that Chief Superintendent McDowell's explanation of why the complaint was not dealt with was "implausible".
She said: "The tribunal found the explanation of the respondents that the failure to deal with the claimant's complaints was because he receives thousands of emails to be implausible, as was his explanation that he 'dropped the ball'.
"The tribunal noted that the explanation of the respondents was given by Andrew McDowell who at the material time held the rank of Chief Superintendent. For these reasons the tribunal finds that the claimant's claims of victimisation succeed in respect of PSD's failure to investigate her complaints.
"The tribunal determines that the respondents did delay the processing of the claimant's Ill Health Retirement (IHR) application and that this did amount to a detriment for the claimant.
"Accordingly, it is the decision of this employment tribunal that the tribunal has jurisdiction to hear the claimant's claims. The claimant's claims of victimisation succeed in their entirety. The claimant's claim of direct discrimination is dismissed."
Judge Porter also said she found Inspector Warhurst's evidence to be "contradictory, confusing and ultimately incredible".
She added: "The tribunal found the claimant to be an entirely credible and reliable witness, whose evidence was all the more impressive given that she remains unwell.
"In reaching this conclusion the tribunal observed that in her evidence the claimant presented as an individual who gave her evidence as truthfully as possible, and who attempted to the best of her ability to give straightforward answers to all questions posed to her in cross examination.
"The tribunal found the evidence of Keith Warhurst to be contradictory, confusing and ultimately incredible. He repeatedly failed to give a clear answer to questions put to him in cross examination.
"On the issue of whether Keith Warhurst had sent either a video clip of topless women or a series of images of topless women on a group WhatsApp the tribunal preferred the evidence of the witnesses Richard Creanor and Simon White whose evidence was clear that such images had been sent by Keith Warhurst."
Ms Malone will find out how much compensation she will be awarded at a remedy hearing to be held at a later date.
Margaret Gribbon, of Bridge Litigation UK Solicitors who represented Ms Malone, said: "This a damning judgement for Police Scotland.
"The employment tribunal upheld my client's claims that Police Scotland victimised her over a lengthy period after she complained about an Inspector's overtly sexist email.
"The employment tribunal's findings lay bare the misogynistic attitudes and culture within armed policing and the hostile treatment police officers face when they try to call it out.
"The serious issues this judgement brings to light need to be urgently addressed."