Idaho Rep. Raul Labrador, a Republican, on Tuesday lost his state's GOP primary for governor.

Labrador, who had given up his seat in Congress to run for governor, will be replaced by real estate broker Russ Fulcher, who won about 43 percent of the vote, The Hill reported.

Idaho Lt. Governor Brad Little won the GOP gubernatorial primary and will face state Rep. Paulette Jordan in the fall.

Labrador, who served four terms in the House, was the co-founder of the House Freedom Caucus, a group of ultraconservative House members.

After the Supreme Court in 2013 struck down a key provision of the Defense of Marriage Act (DOMA) – which prohibited federal agencies from recognizing the legal marriages of gay and lesbian couples – Labrador sponsored a bill that sought a religious exemption for opponents of marriage equality. The legislation sought to protect opponents from “discrimination by the federal government.”

“Some people looked at overturning it, or doing a constitutional amendment,” Labrador said at the time. “I looked at the immediate need, which is the protection of religious institutions and churches, so that they can continue practicing their religion as they see fit.”

Labrador also backed the First Amendment Defense Act (FADA), which has similar goals and was reintroduced in March.

In 2016, the Human Rights Campaign (HRC), the nation's largest LGBT rights advocate, put Labrador on its “hall of shame” list consisting of representatives and senators who have particularly anti-LGBT records.

“These senators and representatives not only voted for anti-LGBTQ legislation, they've introduced harmful bills and amendments, made extreme anti-LGBTQ statements and received a low score on HRC's Congressional Scorecard,” the group said.