A visiting Islamic cleric has left Australia after defending his comments supporting the death penalty for homosexuals in certain cases.

Key points: Sheikh Farrokh Sekaleshfar denies having any connection to gunman Omar Mateen

Sheikh Farrokh Sekaleshfar denies having any connection to gunman Omar Mateen Bill Shorten says he is not welcome in Australia if he holds those views

Bill Shorten says he is not welcome in Australia if he holds those views Sheikh says comments were made in academic setting and that they were taken out of context

Sheikh Farrokh Sekaleshfar, who was visiting Sydney, made the anti-homosexual comments at the University of Michigan three years ago and they have been reportedly linked to the recent massacre in Orlando — a claim he strenuously denies.

Prime Minister Malcolm Turnbull had earlier ordered an urgent review of the sheikh's visa, saying Australia had "zero tolerance for people who come to Australia to preach hatred".

The sheikh said his comments were made in an academic setting, and he regretted that they were filmed and published online.

He said he advocated the death penalty for homosexuals who have sex in public, in a country that abides by Islamic law.

The Sheikh reportedly described death as an appropriate sentence for homosexuality. ( Supplied: YouTube )

"When does this question of death theoretically arise? It arises in particular scenario and it's such a small probability that I've never even heard of such a scenario arising, where in such a country, with such a mandate, where the rule of law is Islam, there where homosexual couples … commit anal copulation in public — no-one does that," the sheikh said.

In an interview with Lateline, he expressed his sympathies to the families of those who died in the Orlando shooting and denied his comments could be seen as justification for the massacre.

"No speech, especially when you're not inciting any hatred and it was given three years ago, that would never lead to such a massacre," the sheikh said.

"That animal, they are connecting me to him [Omar Mateen]. Not at all. He was an ISIS sympathiser, a follower of Baghdadi, these people are criminals."

He also said he would respect any action taken by the Australian Government.

"But if the Government were to make that decision and the people want that, then I respect it, but I don't see any reason for fear even though I do understand why people may panic.

"But I just want to give that assurance that it's not a theme, my themes don't revolve around this area."

Australia won't tolerate people 'preaching hate': Dutton

Mr Turnbull yesterday said Immigration Minister Peter Dutton had asked his department to conduct the review of the sheikh's visa.

"This is a legal matter and has to be dealt with in the appropriate way, but his visa is being reviewed at the direction of the Minister even as we speak," Mr Turnbull said.

Mr Dutton said he was first made aware of the case on Monday.

"We need to consider all of the facts before we make a decision, but the Government's position remains very clear," he said.

"We won't tolerate people who are preaching hate in our country, we won't tolerate the presence of people who fail the character test under Section 501 of the Migration Act."

Opposition Leader Bill Shorten said the sheikh was not welcome in Australia if he held those views.

"If this is the fellow who two or three years ago gave a speech talking about homophobia [and] killing people who are gay, I don't know how on Earth that fellow got a visa," Mr Shorten said.

"Let's call it straight. We've got a character test in our visas.

"I think the Government needs to get onto it quick smart, and this person, in my opinion, is not welcome in Australia holding those abhorrent views."