Farrokh Sekaleshfar, a British citizen, told Australian Broadcasting Corp at Sydney Airport last night that he had decided to leave after discussions with the Muslim community.
He said he had not been asked to leave by the Australian government.
Minister for Immigration and Border Protection Peter Dutton said today that the cleric left before Dutton's department canceled his visa yesterday night.
"This individual has decided to leave of his own accord last night which we welcome and it will be very difficult if not impossible for him to return back to our country," Dutton told Radio 5AA.
More From This Section
The Australian newspaper reported that Sekaleshfar said: "Death is the sentence" for gay sex acts in public. "Out of compassion, let's get rid of them now," he reportedly added.
Sekaleshfar told ABC his comments had been taken out of context. He expressed sympathy for the families of those killed in the Orlando, Florida, gay nightclub and denied his comments could have inspired such a mass shooting.
"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," he said.
Prime Minister Malcolm Turnbull said today that he would investigate why Sekaleshfar had not been placed on a watch list that would have alerted authorities to his visa application.
"The moment that this man's presence and what he had said was drawn to our attention, the minister (Dutton) and I spoke about it, the minister acted decisively and his visa was revoked," Turnbull told Radio 2GB.
Dutton said he had ordered the visa review after becoming aware on Monday of the cleric's presence in Australia.
A gun attack on a gay nightclub in Florida that left 49 dead has focused Australia's current election campaign on the threat posed by Islamic extremists. Australians go to the polls on July 2.
Turnbull said that if his conservative coalition is re-elected, he would propose legislation 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.