When it comes to the history of the federal government’s treatment of gay employees, Uncle Sam should hang his head in shame.

Sam’s history is not just one of blocking gay men and lesbians from getting jobs or promotions. Documents indicate that the government actively sought them out for termination.

The dry language of a Justice Department legal brief, filed in July 2011 in the case of a federal court employee seeking health benefits for her same-sex wife, outlines the federal government’s “significant and regrettable role in the history of discrimination against gay and lesbian individuals.”

“For years, the federal government deemed gays and lesbians unfit for employment, barring them from federal jobs on the basis of their sexual orientation,” the brief said.

The language of bigotry is not so dry.

A November 1950 Senate subcommittee report cited in the brief demonstrated the degree of homophobia in harsh, offensive terms. The report’s title: “Employment of Homosexuals and Other Sex Perverts in Government.”

After running through one stereotype after another and saying gay people “must be treated as transgressors,” the report renders the panel’s conclusion: “In the opinion of this subcommittee homosexuals and other sex perverts are not proper persons to be employed in Government for two reasons; first, they are generally unsuitable and second, they constitute security risks.”

It’s true that gay men and lesbians in the closet of a homophobic world could be blackmail targets. But the Senate report goes way beyond that possibility in rationalizing blatant discrimination: “The lack of emotional stability which is found in most sex perverts, and the weakness of their moral fiber, makes them susceptible to the blandishments of the foreign espionage agent.”

Lest one think this represents more bark than bite, the report says “that between January 1, 1947, and August 1, 1950, approximately 1,700 applicants for Federal positions were denied employment because they had a record of homosexuality or other sex perversion.”

Another report, from March 1950, was titled “Employment of Moral Perverts by Government Agencies.”

Times have changed.

“In the past 50 or 60 years, we have gone from overt witch hunts that terrified federal employees to Executive Branch policies that are firmly welcoming of LGBT [lesbian, gay, bisexual and transgender] workers,” said Jennifer C. Pizer, legal director of the Williams Institute on Sexual Orientation Law and Public Policy at the UCLA School of Law. “But federal statutory protections remain essential because administrative policies can come and go with election returns, and variations in policy can have dramatic effects on the federal workplace environment.”

The Senate subcommittee’s report from November 1950, according to the Justice Department brief, led President Dwight D. Eisenhower in 1953 to issue Executive Order 10450, “which officially added ‘sexual perversion’ as a ground for investigation and possible dismissal from federal service.”

The Justice brief said that “the Order expanded the investigations of civilian employees for ‘sexual perversion’ to include every agency and department of the federal government, and thus had the effect of requiring the termination of all gay people from federal employment. . . .

“The federal government enforced Executive Order 10450 zealously, engaging various agencies in intrusive investigatory techniques to purge gays and lesbians from the federal civilian workforce.”

Quoting a 2006 Texas Law Review article titled “Where Everything Old Is New Again — Enduring Episodic Discrimination Against Homosexual Persons,” by Edward L. Tulin, the brief said that “the State Department, for example, charged ‘skilled investigators’ with ‘interrogating every potential male applicant to discover if they had any effeminate tendencies or mannerisms,’ used polygraphs on individuals accused of homosexuality who denied it, and sent inspectors ‘to every embassy, consulate, and mission’ to uncover homosexuality.”

Citing research by the Williams Institute, the Justice Department said: “In order to identify gays and lesbians in the civil service, the FBI ‘sought out state and local police officers to supply arrest records on morals charges, regardless of whether there were convictions.’ ”

The FBI was aided by the U.S. Postal Service, which, according to Justice and the Williams Institute, established “a watch list on the recipients of physique magazines. . . . The end result was thousands of men and women forced from their federal jobs based on the suspicion that they were gay or lesbian.”

The extent of the change is demonstrated, to cite one example, by the fact that the current director of the Office of Personnel Management, John Berry, is an openly gay man.

Yet, protections against sexual orientation discrimination “are only effective if the federal workforce knows they exist and how to make use of them,” said Brian Moulton, legal director of the Human Rights Campaign. “Under the Obama administration and the leadership of John Berry at OPM, there has been a concerted effort to ensure that lesbian, gay, bisexual and transgender federal workers, as well as their managers and colleagues, know that they have the right to be treated fairly, and have recourse if they are not.”

Staff researcher Alice R. Crites contributed to this report.

Previous columns by Joe Davidson are at wapo.st/JoeDavidson. Follow the Federal Diary on Twitter: @JoeDavidsonWP.