Roy Moore after defying a federal court by refusing to remove the Ten Commandments statue. (Photo by Gary Tramontina/Getty Images)

Roy Moore, the disgraced former judge leading the pack in a US Senate election, has close ties to a pastor who has called for gay people to be put to death.

Roy Moore is running for the US Senate seat vacated by Trump’s Attorney General Jeff Sessions, and has a lead over his GOP primary opponent.

It has emerged this week that Moore also has ties to an extremist pastor who has called for gay people to be put to death.

CNN reports that Moore has appeared multiple times on a radio show hosted by pastor Kevin Swanson, who is known for preaching that gay people must be stoned to death.

GOP officials have been embarrassed over ties to Swanson in the past, with Senator Ted Cruz forced to apologise last year for appearing at an event run by him.

At the event, Swanson shouted: “Yes, Leviticus calls for the death penalty for homosexuals! Yes, the Apostle Paul does say that homosexuals are worthy of death! His words, not mine, and [screaming] I AM NOT ASHAMED! I am not ashamed of the truth of the word of God!”

Cruz later admitted it was a “mistake” to appear at the event, claiming he was unaware of Swanson’s homophobic views.

However, Moore’s association with him is much more long-standing, appearing at least five times on Swanson’s Generations Radio show. He appeared as recently as February 2017, long after Swanson’s views were known.

In his appearances on Swanson’s show, the pair both rallied against the ‘gay agenda’.

Meanwhile, in a 2015 interview Moore refused to say whether he supports gay people being put to death.

Asked if gay people should be executed, he said: “Well I don’t, you know, I’m not here to outline any punishments for sodomy.

“That’s far beyond any issues I’ve come in contact with. I can’t help what some people say, what some people do.”

He added: “In 1960, every state in the union had laws against sodomy. And in the beginning of the country, in 1776, all 13 colonies had laws against sodomy. So sodomy is historically against the law.”

Moore is most famous for being ejected from his role as Alabama’s Chief Justice, after abusing his authority in a bid to block gay weddings in the state.

The disgraced justice had issued a string of orders declaring the US Supreme Court ruling on equal marriage “doesn’t apply” in Alabama due to state anti-gay laws, and ordered probate judges to enforce a gay marriage ban.

Moore will face off against Luther Strange in a GOP run-off election this month.

The winner of the Republican run-off will take on Democrat Doug Jones in the special Senate election on December 12.

Victory in the GOP run-off all-but-guarantees victory in the special election, as no Democrat has won a Senate race in the state in more than two decades.