Controversy broke out in the run-up to the funeral of boxing legend Muhammad Ali when Turkish President Recep Tayyip Erdogan pulled out after being denied an opportunity to speak.

Tens of thousands of people were anticipating the funeral procession of the former heavyweight champion through his hometown of Louisville, Kentucky, while free tickets for the 18,000-person funeral service at the city's KFC Yum! Centre were quickly snapped up.

The funeral cavalcade was to begin at 9am local time and take the coffin past his childhood home, the Ali Center, the Center for African American Heritage and then down Muhammad Ali Boulevard.

Numerous celebrities and political figures were set to attend, including comedian Billy Crystal, singer-songwriter Yusuf Islam, actor Will Smith and former President Bill Clinton, who was to deliver a eulogy.

Erdogan had initially been pushing to speak at Ali’s funeral service, and did attend an Islamic prayer service held on Thursday.

However, on Friday the Hurriyet newspaper said that Erdogan would be cutting his trip short and not attending the funeral service - a number of explanations were given, including that the president attempted to a put a piece of cloth from the Kaaba on Ali’s coffin during the funeral prayers, but was refused permission to do so.

Other reports suggested he left because Erdogan and the Turkish head of the religious affairs directorate Mehmet Gormaz wanted to read an extract from the Quran at the funeral and were also denied permission.

In addition, a brief fight broke out between Erdogan’s bodyguards and a US secret service official, allegedly because the official had wanted to stand in the same place as Erdogan’s bodyguards as the president was getting into his car.

There were also rumours that the funeral might lead to a potentially tense meeting between Erdogan and nemesis Fethullah Gulen, whose Hizmet movement was last week branded a "terrorist" organisation by the Turkish government.

Ali had long maintained close relations with Turkey: On his first visit in 1976 he met with Erdogan's political mentor, the Islamist politician Necmettin Erbekan. According to legend, Ali later remarked that "no white leader ever before embraced me" - an ironic statement, considering Erbekan's reputation as representing the views of the "black Turks", a term referring to the conservative, non-Westernised Turks of central Anatolia.

Nevertheless, Ali's reputation in Turkey is thought to cut across the political divides, with Islamists, leftists, secularists and conservatives all lauding him.

Erdogan had been keen to emphasise his admiration for Ali prior to the event and an article appearing under his name in Bloomberg on Thursday praised Ali's achievements.

"Muhammad Ali was an exceptional athlete and a remarkable human being," said the article. "For many a sleepless night in the 1970s, I was one of countless people in Turkey who would get up in the wee hours to watch the Louisville Lip's fights."

Others, however, accused Erdogan of hypocrisy in praising Ali's achievements as an opponent of the Vietnam War and conscription.

"The people who would lynch me had I said 'Kurds did not do anything to me, why would I join the [Turkish] army?' are praising Ali [for his stand against the Vietnam War]," said one tweeter, referring to the Turkish army's ongoing campaign against Kurdish militants in the country's southeast.

Meanwhile, at the service, Rabbi Michael Lerner recieved a standing ovation after calling out politicians for singling out Muslims and for standing up for Palestinian rights.

Rabbi Michael Lerner gets a standing ovation at #MuhammadAli's funeral service for his words about Muslims https://t.co/mCSd7dPPjg — SkyNews (@SkyNews) June 10, 2016

"We have called upon the United States to stand up to the part of the Israeli government that is oppressing Palestinians. We as Jews understand that our commitment is to recognize that God has created everyone in God’s image and that everyone is equally precious and that means the Palestinian people as well as all other people on the planet," he said.