An Afghan ambassador has criticised Australia's handling of the case of a Hazara asylum seeker who has been allowed to remain in the country after an 11th-hour court injunction.

Nasir Andisha, Afghanistan's ambassador to Australia, raised concerns about the Commonwealth's approach to a 65-year-old man who arrived by boat in 2011.

The asylum seeker's lawyers successfully applied for an injunction to stop the deportation in the Federal Court in Sydney on Tuesday evening.

The Hazara people are a minority group that have been victim to widespread persecution within war-torn Afghanistan.

Deporting the man to Afghanistan would have been "criminal", Refugee Action Coalition spokesman Ian Rintoul said.

"He has not even lived in Afghanistan for 27 years," he said.

"His wife and 10 children are living in Quetta in Pakistan. But the government gave no consideration to this at all."

If the injunction had been unsuccessful, the asylum seeker would have been flown to Kabul, Afghanistan, on Tuesday night, the Refugee Action Coalition says.

The Afghan embassy was only approached about the case late last week, Mr Andisha said.

"Reviewing the situation, particularly for the Hazaras in Quetta and some parts of Afghanistan, I think this case should have been given more time and reviewed properly," he told AAP.

The Refugee Review Tribunal dealt with the Hazara man's case in 2012 and found it would not be safe for him to live in his home province but he could live in Kabul.

The Department of Immigration has been approached for comment.