Acting Attorney General Matthew Whitaker, now the most powerful law enforcement official in the country, has a public record spanning more than a decade that concerns a number of LGBTQ advocates.

"Whitaker has made clear he is a committed ally to extreme right-wing activists who oppose marriage equality, would block military service of qualified LGBTQ people, and would define ‘sex’ in an attempt to erase all legal protections for LGBTQ Americans,” David Stacy, director of governmental affairs for the Human Rights Campaign, a national LGBTQ advocacy group, told NBC News.

Whitaker earlier this month replaced Jeff Sessions, whose positions on LGBTQ issues were widely criticized by advocates during his two years as attorney general. Stacy and a number of other LGBTQ advocates expect Whitaker, who has been at DOJ in some capacity since September 2017, to continue in his former boss’s footsteps.

"The appointment of Matthew Whitaker as acting Attorney General signals that the anti-LGBTQ policies of Donald Trump, Mike Pence and Jeff Sessions will continue unchecked and unabated," Stacy said.

POLITICAL “WITCH HUNT”

Whitaker began his political career in his home state of Iowa. In 2004, President George W. Bush appointed him as the U.S. Attorney for the Southern District of Iowa, a role he remained in for five years.

During his time in office, Whitaker investigated Matt McCoy, an openly gay state senator from Iowa’s 21st District. Whitaker alleged McCoy extorted $2,000 from a business partner, a charge for which McCoy faced a possible 20-year jail sentence.

McCoy, who was eventually acquitted of the charges, recently called Whitaker’s investigation a political “witch hunt” and said he believes Whitaker targeted him in part due to his sexual orientation.

“At the time, the national Democratic Party had named me among the 100 up-and-coming Democratic leaders to watch,” McCoy wrote in an op-ed published by Politico on Sunday. “I was young. I was liberal. I was popular. I had never been defeated. I had flirted with running for Congress. And I was openly gay, which surely didn’t increase my popularity with social conservatives like Whitaker.”

McCoy said his reputation is still damaged because of Whitaker’s accusation.

“CULTURE WARRIORS”

In 2011, Whitaker served as the emcee for a “family values” panel at the Conservative Principles Political Action Committee Conference in Des Moines. The panel consisted of leaders from some of the country’s most strident anti-LGBTQ organizations, including Brian Brown of the National Organization for Marriage, and Connie Mackey of the Family Research Council.

The National Organization for Marriage fought against same-sex marriage, and the Family Research Council — which has been labeled an anti-LGBTQ “hate group” by the Southern Poverty Law Center — states on its website that “homosexual conduct is harmful to the persons who engage in it and to society at large, and can never be affirmed.”

Before Whitaker introduced the panelists, he invoked the “culture wars,” saying: “No, they’re not over; we’re still fighting.”

And after the panel, he doubled down by saying, “What a great group of culture warriors,” as he opened the floor to questions from the audience.

Whitaker ran for the U.S. Senate in 2014, and on the campaign trail, he said he opposed the repeal of the military’s “don’t ask, don’t tell” policy and supported a constitutional amendment prohibiting same-sex marriage.

During the Republican primaries, Whitaker met with 15 Iowa home-schooling leaders, according to a local site, Caffeinated Thoughts, and expressed his displeasure at the Obama administration’s decision three years before to permit gay people to serve openly in the armed services.

“I don’t want to see our military treated as a Petri dish,” he said in response to a veteran’s question about the repeal of “don’t ask, don’t tell” and having women serve in combat roles.

During his Senate bid, Whitaker went on record supporting a constitutional amendment barring gay marriage, and in an interview at the time said: “I believe marriage is between one man and one woman. Throughout history it’s traditionally been up to the churches and to God to define that.”

“During his time in Iowa politics, he tried to attack and dismantle LGBTQ rights and protections at every turn,” Daniel Hoffman-Zinnel, executive director of LGBTQ rights group One Iowa, said of Whitaker’s track record in the state.

In 2014, Whitaker told an audience gathered by the conservative Christian organization Family Leader that he thought all judges should have “a biblical view of justice.”

“If they have a secular worldview, then I’m going to be very concerned about how they judge,” he said.

Jenny Pizer, law and policy director at LGBTQ legal organization Lambda Legal, said these comments are particularly troubling.

“That raises alarm bells on multiple issues: a basic understanding of the separation of church and state, and a profession of an unusually extreme religious worldview on his part,” Pizer explained.

“THE GAYSTAPO”

After his failed Senate bid, Whitaker volunteered for First Liberty (formerly the Liberty Institute), a conservative organization focused on “protecting religious liberty.” There he represented Bob Eschliman, an editor at Iowa’s Newton Daily News. Eschliman was fired after publishing blog posts in which he called LGBTQ people “the enemy” and the “gaystapo.” Eschliman lodged a complaint with the Equal Employment Opportunity Commission alleging that his termination violated his civil rights.

Whitaker argued on behalf of Eschliman that the company engaged in "intentional discrimination in express contravention of Title VII" of the 1964 Civil Rights Act, because, Whitaker argued, Eschliman was fired because of his "sincerely held religious beliefs."

Douglas NeJaime, an LGBTQ legal scholar and professor at Yale Law School, disagreed with Whitaker’s interpretation of the law.

“He actually wasn’t discriminated against because he’s evangelical or Christian or Catholic,” NeJaime said of Eschliman. “He was terminated for expressing views publicly that he says are his religious views, but he isn't being discriminated against for his status as a religious person.”

The case was settled out of court, but as acting attorney general, Whitaker is now in a position to define the federal government's position on similar cases regarding Title VII and religious liberty.

Under Sessions, the DOJ repeatedly articulated support for religious freedom over and above the civil rights of LGBTQ people, according to advocates, and moved to limit the scope of Title VII to exclude transgender employees.

Pizer said that Whitaker’s past — from his on-the-record comments to his work for organizations like First Liberty, which declared the legalization of same-sex marriage the start of a “new religious freedom war” — suggests that DOJ’s current efforts to dismantle discrimination protections for LGBTQ people will continue apace.

“The fact that he was working pro bono for one of the religious conservative legal groups means he comes from a similar group of hard-right advocates from which this administration has selected consistently for its top leadership,” Pizer added.

The DOJ did not respond to NBC News’ request for comment on Whitaker and his record.

FOLLOW NBC OUT ON TWITTER, FACEBOOK AND INSTAGRAM