Roy Moore won the Republican primary against Alabama Senator Luther Strange.

Strange, who had the backing of President Donald Trump, was appointed to replace Jeff Sessions after the former senator was confirmed as attorney general.

The contest was not close, with Moore receiving 54.6 percent of the vote to Strange's 45.4 percent.

Moore had the backing of several anti-LGBT groups, including the Family Research Council (FRC) and the National Organization for Marriage (NOM).

While Strange is also opposed to LGBT rights, Moore's views on the subject are extreme.

Moore, a former Alabama Supreme Court chief justice, was ousted from the bench last year after ordering judges to defy the Supreme Court's ruling in Obergefell, in which the court found that gay and lesbian couples have a constitutional right to marry.

(Related: AL Supreme Court upholds Roy Moore's suspension.)

In announcing his campaign, the 70-year-old Moore reiterated his opposition to marriage equality, saying that the Supreme Court had “destroyed … our sacred institution of marriage.”

Moore has previously said that allowing gay couples to marry goes against God, will lead to incest, polygamy and child abuse, and will “destroy” the United States.

As recently as two years, Moore said that gay sex should be illegal.

(Related: Bryan Fischer sides with Roy Moore on criminalizing homosexuality.)