Roy Moore defeated Sen. Luther Strange in Alabama's runoff on Tuesday. As he prepares to take on Democrat Doug Jones in the general special election in December, learn more about the man who is considered to be a controversial figure in both his home state and around the country.

1. He's Alabama's former chief justice

Moore, an Alabama native who attended West Point and served in the Vietnam War, has twice served as chief justice in the state Supreme Court, which justices are elected to. Justices' terms are supposed to last for six years, but Moore didn't serve a full term either time, because of two issues: the Ten Commandments and same-sex marriage.

2. The Ten Commandments, part 1

To understand Moore and the Ten Commandments, you have to go back to before Moore's time as chief justice. When Moore, an evangelical Christian, became a circuit judge in 1992, he brought a wooden plaque bearing the Ten Commandments. According to The Atlantic, he said, "I wanted to establish the moral foundation of our law."

Whatever his intention, the display became part of a lawsuit from the ACLU, which said the plaque and pre-session prayers Moore held were unconstitutional. While that battle ended in 1998, when the case was thrown out for technical reasons, it was only a hint of what was to come.

3. The Ten Commandments, part 2

When Moore first served as chief justice for the state Supreme Court, he had a Ten Commandments monument installed in Alabama's judicial building, and he did so without consulting his fellow justices.

"Today a cry has gone out across our land for the acknowledgment of that God upon whom this nation and our laws were founded," he said the day the statue was unveiled. "May this day mark the restoration of the moral foundation of law to our people and the return to the knowledge of God in our land."

The statue led to a federal lawsuit and vaulted Moore into the national public eye. When Moore refused to follow a court order requiring him to have the statue removed, he was suspended and removed from office.

4. He's against same-sex marriage

During his second stint as chief justice, Moore issued an order in 2015 that told probate judges not to issue marriage licenses to same-sex couples, despite the state's ban being struck down by a district judge.

The Supreme Court would go on to legalize same-sex marriage that same year. But Moore stuck by his guns, telling probate judges they had a "ministerial" duty not to issue same-sex marriage licenses. Most judges ignored him, but after the Southern Poverty Law Center filed a complaint against him, Moore was once again suspended from the bench.

Still, his anti-LGBT stances were known long before then. In a 2002 opinion, he wrote, "Homosexual behavior is a ground for divorce, an act of sexual misconduct punishable as a crime in Alabama, a crime against nature, an inherent evil, and an act so heinous that it defies one’s ability to describe it."

5. He's thought about politics before

After he was ousted from the bench the first time, Moore tried to get into politics. He ran for governor in 2006, but lost in the Republican primary to incumbent Gov. Bob Riley. He ran and lost again in 2010, this time coming in fourth place in the Republican primary.

He reportedly considered a presidential run 2011, but then opted to run for his old office as chief justice. Though he won his second run for chief justice, many top Republicans in the state chose to back his Democratic opponent.