A demonstrator waves a rainbow flag in front of the U.S. Capitol in Washington. Photo: MARIA BELEN PEREZ GABILONDO/AFP/Getty Images

In an unprecedented move, Secretary of State John Kerry apologized on behalf of the State Department Monday for “decades” of discrimination against LGBTQ employees. In a letter released just 11 days before he leaves office, Kerry wrote that discriminatory practices “as far back as the 1940s” were “wrong then, just as they would be wrong today.”

“In the past … the Department of State was among many public and private employers that discriminated against employees and job applicants on the basis of perceived sexual orientation, forcing some employees to resign or refusing to hire certain applicants in the first place,” he wrote. “On behalf of the department, I apologize to those who were impacted by the practices of the past.”

what the-- John Kerry just apologized, on behalf of the State Dept, for past discrimination against LGBTQ employees pic.twitter.com/okUtTSBxxU — Jennifer Bendery (@jbendery) January 9, 2017

According to CNN, Kerry has been under pressure from LGBTQ-rights groups to issue a public apology in his final weeks in office. In November, Senator Ben Cardin, who chairs the Senate Foreign Relations Committee, wrote a letter to Kerry asking the State Department to apologize for the “lavender scare,” “in which hundreds of State Department employees were dismissed from service because of their perceived sexual orientation.” In the letter, Cardin detailed discriminatory practices in place throughout the 1950s and ‘60s:

According to the Department’s Bureau of Diplomatic Security, employees were forced out of the Department on the ostensible grounds that their sexual orientation rendered them vulnerable to blackmail, prone to getting caught in “honey traps,” and made them security risks, with many more prevented from joining the Department due to a screening process that was put in place to prevent those who “seemed like they might be gay or lesbian” from being hired.

“There is little we can do to undo the hurts and wrongs of the past,” Cardin concluded. “But we can take steps to assure that the lessons of these episodes are learned and remembered.” His letter was echoed by the Human Rights Campaign, which called the apology “a small but crucial gesture [that] would help to set the right tone at your Department as it enters a new and uncertain time in our country.”