Alyssa Bermudez protests in front of the headquarters of the Transportation Security Administration in 2016. She alleges that she was sexually harassed by TSA executives and that she was fired after complaining about her treatment. (Bill O'Leary/The Washington Post)

One senior Transportation Security Administration official put pictures of topless women on his walls; another ordered women to move his furniture, while others spread rumors about female employees’ sex lives, former agency workers said in court. Another executive called a group of female workers a “harem.”

Those accounts were aired over several weeks this fall as one former TSA employee sued the agency in federal court in Alexandria, Va., alleging that he was demoted for taking a stand against what he saw as sexual harassment.

The TSA won. But the trial testimony, along with a recently released congressional report that was three years in the making, describes a toxic culture in the agency’s headquarters in the Pentagon City area of Arlington, Va.

Government attorneys defending the agency successfully argued that Mark Livingston, the onetime deputy head of the intelligence office, was demoted for being a bullying boss, not in retaliation. But the lawyers did not challenge the accounts of two women who testified about ­pervasive sexism in the office, even as government witnesses denied making some of the offensive comments attributed to them.

“I felt belittled and degraded and like an object,” Alyssa Bermudez, a former executive assistant, told jurors during the trial in Alexandria. “It was uncomfortable to go into work each day.”

“It was very much a boys’ club, very much protected by some and challenged by a few,” testified Raechell Bailey, a program analyst.

Assistant U.S. Attorney Christine Roushdy told the jury that the case was “not about whether Raechell Bailey and Alyssa Bermudez were subjected to a hostile work environment” but about how Livingston was treated. And “crass” words, she said, did not always rise to the level of discrimination.

Another former TSA employee, Holly Shenk, testified about being the subject of sexual rumors; in court papers, Livingston listed 27 more employees who had filed sexual harassment complaints.

Livingston, who is now a deputy undersecretary of the Navy, contended that he was punished for defending many of those women and was mistreated at the TSA because of combat injuries he sustained in military service and because of his Native American heritage. The TSA denied Livingston’s claims, and other TSA executives testified that he hurt staff morale by demeaning subordinates for minor mistakes.

“TSA could not have a leader who was humiliating rather than motivating employees,” Roushdy told jurors.

The TSA did not respond to requests to comment specifically on the women’s accounts but said in a statement that it “holds its employees to the highest ethical standards and takes allegations of misconduct by its employees very seriously.”

Regarding the verdict, which was delivered in November, the agency said the jury’s finding “upholds TSA’s right to remove executives who during their probationary period do not meet established standards of performance.” The statement further said the agency “is committed to providing its employees with a safe workplace free of harassment, discrimination and reprisal.”

But employees who have spoken out against the agency fear that the outcome of the case will encourage what they see as harassment and retaliatory behavior.

“I worry that this result could embolden the retaliatory culture that has been festering at TSA,” said Tamara Miller, a lawyer who once led the TSA’s civil rights office and now represents Bermudez.

Livingston said he knew the lawsuit was a “gamble” but did not want to give the agency “a green light to say, ‘We can do whatever we want and win in court.’ ”

The trial came weeks after the House Oversight and Government Reform Committee released a report identifying numerous instances of senior officials punishing employees who raised concerns about inappropriate behavior in the workplace, while shielding those who had been accused.

The report also concluded that TSA leaders stonewalled efforts to investigate suspected wrongdoing, often refusing to turn over documents and even ignoring subpoenas.

“It’s not just me, it’s not just Mark,” Heather Callahan Chuck, one of three whistleblowers who this spring shared a nearly $1 million settlement from the TSA, said in an interview. “If they made some senior-level changes, they could really change the culture. Why they don’t, I don’t know.”

Several of the incidents in the report involve Joe Salvator, who has held various positions in the agency. On the witness stand at the Alexandria trial, he said he was deputy director for security operations coordination. The TSA identified his title only as program manager.

During her trial testimony, Bermudez said that while she was in a meeting with Salvator in 2014, he leered at her and asked her what she wanted to be when she grew up.

Salvator testified that he had done nothing inappropriate in that meeting and had told her only to “figure out what you want to be when you grow up” because he had found her “very impressive.”

For months, Bermudez picketed outside TSA headquarters after she was let go in what she says was retaliation for filing a complaint over that encounter. The U.S. Office of Special Counsel is investigating her allegations.

Salvator was also involved in forcing Chuck and two other TSA officials in Hawaii to move to the mainland because they identified security problems and complained of sexist leadership, according to the congressional report. While the report did not name him, attorneys for the TSA confirmed his identity in court filings.

According to the congressional report, Salvator also “pursued an inappropriate relationship with a subordinate and sent explicit communications to her,” then lied about it until confronted with the sexual emails. His dismissal was recommended, but, ultimately, he was demoted with no reduction in pay for what the TSA’s then-leader deemed a “crime of emotion,” the report says. In a deposition before trial, Salvator testified that “for the most part,” the woman’s account was accurate, “but not everything in there I would agree with.”

Salvator did not return calls, emails or a request placed through the TSA requesting that he comment for this article.

Livingston testified that other officials bristled when he told them to take photos of women in swimsuits off the walls and curb boorish behavior. He said he supported a female employee who filed a complaint against his supervisor alleging that he chose a less qualified man for a promotion after questioning her toughness and work-life balance.

Livingston testified that the man who got the job, Russell Roberts, directed three female employees to move his desk while he drank coffee and watched.

“I said, ‘You need to move your own stuff,’ ” Livingston testified. “He said, ‘That’s what these b----es are for.’ ”

Roberts, he said, began telling people in the office that Livingston had brain injuries or post-traumatic stress disorder from a combat injury he suffered in Iraq and called him a “crazy Indian.”

Dan Foerter, who was the office’s chief scientist at the time, testified to hearing some of those insults against Livingston.

“It’s the worst place I’ve ever worked,” he said after court. “Talking badly about people was almost institutionalized.”

After he reported to the TSA’s equal employment office that he had heard Roberts’s comments, Foerter testified, he was fired so suddenly that he had to be brought back to finish projects no one else could complete.

On the witness stand, Roberts denied making any discriminatory or offensive comments. He is now the TSA’s chief information officer. He did not respond to calls and emails requesting comment for this article.

Roushdy told the jury that even if Roberts had made the derogatory comments attributed to him, as a subordinate, he had no authority over Livingston or his career.

Other executives spread rumors that Livingston was having affairs with the women he championed, all three women testified, making it uncomfortable for them to go to him with new concerns. A high-ranking official called them Livingston’s “harem,” Bermudez said.

That official, Christopher Coffey, testified that the comment was “water cooler talk in a joking manner,” meant to illustrate that “Livingston liked to surround himself with young and attractive women for his ego purposes.” He testified that he did not say Livingston had sexual relationships with any female employees.

Coffey, now a representative for the TSA abroad, did not respond to calls and emails requesting comment.

The TSA has had a troubled history since its creation after the Sept. 11, 2001, terrorist attacks and consistently ranks among the worst government agencies for employee morale. In 2012, Congress strengthened whistleblower protections for TSA employees, but problems have continued.

TSA Administrator David Pekoske, who took over as head of the agency in August 2017, said employees are receiving additional training about the Whistleblower Protection Act.

In testimony before the House Oversight and Government Reform Committee in September, Pekoske said he met with six people who have filed complaints about treatment in the workplace in hopes of understanding what other steps the agency needs to take to improve the working environment. He also said that from 2016 to 2017, the number of such complaints had declined.

Bermudez testified that the Monday after Livingston was demoted, she came in and saw a group of analysts and officials blacking out the eyes on his photo and knocking it off the wall.

“They were laughing . . . almost in celebration,” she testified.

Bailey was pregnant and on bed rest when Livingston was demoted. She testified that she felt she could not return to the intelligence office because false stories were being spread that he was the father of her newborn child.

Working there “shattered” the dream she had of helping protect the skies, she said: “It was really a disgusting place.”

But she said she keeps a whiteboard in her home with a message from her old boss: “Be professional.”