Randy Berry joined the State Department in 1993, a time when gays and lesbians in the federal work force tended to lie low. He was circumspect about his personal life early in his career — with good reason.

When President Bill Clinton signed an executive order in 1995 barring the government from denying security clearances solely on the basis of a person’s sexual orientation, the Family Research Council warned that “in all healthy societies, homosexuality is recognized as a pathology with very serious implications for a person’s behavior.” In 1999, when Mr. Clinton announced the first nomination of an openly gay person for an ambassadorship, then-Senator Chuck Hagel questioned whether an “openly, aggressively gay” diplomat could “do an effective job.”

Today, Mr. Berry, the State Department’s first envoy for the human rights of lesbian, gay, bisexual, transgender and intersex people, draws on that history often as he makes the case abroad that societies can and should become more inclusive.

“I know what it feels like to face a certain amount of discrimination and exclusion,” Mr. Berry, who has been in the job for a little over a year, told me. “I look back at how the movement progressed and how it opened doors for people of my generation.”