Australia is considering canceling the visa of an Islamic cleric who had called for gay people to be killed and reportedly preached at a mosque near Orlando weeks before the nightclub massacre, the Australian government said on Tuesday.

British-born Sheikh Farrokh Sekaleshfar arrived in Sydney a week ago as a guest speaker of the Imam Husain Islamic Center, The Australian newspaper reported.

Asked about homosexuality at a lecture at the University of Michigan in 2013, Sekaleshfar said: "Death is the sentence," the newspaper reported.

"Out of compassion, let's get rid of them now," he reportedly added.

Sekaleshfar delivered a sermon entitled "How to Deal with the Phenomenon of Homosexuality" at the Husseini Islamic Center in Sanford, Fla. last month, according to reports.

Australia's Prime Minister Malcolm Turnbull said the Department of Immigration and Border Protection was reviewing Sekaleshfar's visa.

"We have zero tolerance for people to come to Australia who preach hatred. Zero tolerance," Turnbull told reporters.

Minister for Immigration and Border Protection Peter Dutton said he had ordered the visa review after becoming aware on Monday of the cleric's presence in Australia.

Sekaleshfar did not immediately return the AP's call on Tuesday.

The attack on a gay nightclub in Florida that left 49 dead early Sunday has focused Australia's current election campaign on the threat of Islamic fundamentalism. Australians go to the polls on July 2.

Turnbull said that if his conservative coalition were re-elected, he would legislate to ensure that people convicted of terrorism offenses could remain in prison after serving their sentences if a court ruled that they continued to pose a threat to society.

Opposition leader Bill Shorten welcomed the review of Sekaleshfar's visa.

"I do not know how this fellow got a visa," Shorten told reporters. "I think the government needs to get on to it quick smart and this person, in my opinion, is not welcome in Australia holding those abhorrent views."

The Associated Press contributed to this report.