Republican Ted Cruz came under fire for months following his appearance at the same conference as SwansonReuters

Republican presidential hopeful Ted Cruz has said it was 'a mistake' to share a platform with a 'kill the gays' preacher Kevin Swanson, who thinks parents should drown children who read Harry Potter.

Cruz had been under pressure for several months to disassociate himself with hate preacher Kevin Swanson, with whom he shared a stage at a National Religious Liberties Conference in Iowa in November 2015, Pink News reported.

Swanson told the audience at the conference: "Yes, Leviticus 20:13 calls for the death penalty for homosexuals. Yes, Romans Chapter 1 verse 32 the Apostle Paul does say that homosexuals are worthy of death – his words, not mine – and I am not ashamed, I am not ashamed of the Gospel of Jesus Christ."

The hate preacher goes on to say that he would not ask politicians to bring in capital punishment for homosexuality immediately, as he wants to give gay people 'a chance to repent' also adding that adultery and homosexuality are similar – with both set to "burn in hell".

Campaign spokesperson at the time, Rick Tyler, called Swanson's comments "reprehensible", adding: "Senator Cruz is passionate about religious liberties. Many respected organisations were sponsoring [the conference], but, given these offensive comments, it was a mistake for Senator Cruz to appear at the event."

At the conference, Swanson, who works out of the Reformation Church of Elizabeth in Colorado, also laid into Harry Potter and DreamWorks Animation's film How to Train Your Dragon.

He told parents that Dumbledore was a 'homosexual mentor' for Harry Potter and that "for tens of millions of parents it would be better that a millstone be hung around their neck and they be drowned at the bottom of the sea", adding that Hiccup from How to Train Your Dragon was also "homosexual".

Swanson said parents who let their children watch Harry Potter should be 'drowned at the bottom of the sea'Warner Bros. Pictures

Even kid's favourite Frozen has previously come under fire from Swanson who suggested it would encourage children to normalise bestiality, stating: "I wonder if people are thinking, 'You know, I think this cute little movie is going to indoctrinate my five-year-old to be a lesbian or treat homosexuality or bestiality in a light sort of way.'"

Cruz's presence at the conference, as well as that of candidates Mike Huckabee and Bobby Jindal, has been criticised for several months by MSNBC anchor Rachel Maddow, who called on Cruz to apologise, stating at the time of the rally: "I'm not rounding up to the nearest scary thing. It really was a 'kill the gays' call to arms.

"This was a conference about the necessity of the death penalty as a necessity for homosexuality... part of the way [Huckabee, Jindal, and Cruz] are campaigning for president is by attending a 'kill the gays' rally. And I don't know if that is considered to be a scandal any more in Republican politics."

The rally was also picked up by Right Wing Watch, which shared a video of Swanson's speech at the rally.