Iowa Representative Steve King has lost his GOP primary race in Iowa.

King lost to Iowa state Senator Randy Freenstra, who claimed 45.7 percent of the vote to King's 36 percent, the AP reported.

King has a long history of voting against LGBT rights and making anti-LGBT statements. He also has a history of embracing white nationalism and opposing immigrants.

Last year, the U.S. House approved a resolution rebuking King for suggesting that he was in favor of white nationalism. He also lost his committee assignments over the remarks.

King scored zero on the Human Rights Campaign's (HRC) latest Congressional Scorecard, a measure of a lawmaker's support for LGBT rights. He also scored zero during the 114th and 113th congressional sessions.

In 2017, King suggested transgender troops only enlist to get free surgery. He is also strongly opposed to marriage equality, saying separately that the Supreme Court's 2015 ruling legalizing same-sex unions means “you can marry my lawnmower” and predicted it would lead to civil war.

In a 2011 interview, he proudly insisted that he's opposed to marriage equality.

(Related: Steve King sets the record straight: He's anti-gay marriage.)

Feenstra also is opposed to LGBT rights. While in the Iowa Senate, he introduced a bill that sought to reverse marriage equality in the state and voted for a measure that prohibited transgender surgeries under Medicaid.