The immigration minister, Peter Dutton, has been ordered by a court to revisit the refugee application of a man he wanted to deport to war-torn Syria.

The man came to Australia on a child visa in 2005 but was sentenced to three years in prison in 2011 for intentionally causing serious injury.

In 2014, Dutton cancelled the man’s visa under section 501 of the Immigration Act for failing the character test.

The man is a citizen of Syria, a country locked in a bloody civil war and under siege from Islamic State, so he applied for a protection visa. Dutton refused that application in October 2016.

Australia has a non-refoulement obligation, meaning under international law the man can’t be sent to Syria.

In making his decision, Dutton noted the man would not be removed from Australia and faced indefinite detention.

But at a federal court hearing in Melbourne in March, lawyers for the man argued that under the section of Australia’s Immigration Act on which Dutton made his decision the man could not be held in detention indefinitely.

They said under the section he technically had to be sent to Syria – which would breach international law.

In a judgement delivered this week, Justice Anthony North quashed the protection visa refusal and ordered a review of the application.

North wrote that had Dutton properly understood the consequence of his refusal, protection may have been granted to “avoid the consequence that the applicant would be returned to Syria in contravention of Australia’s non-refoulement obligations”.

The minister has 21 days from the judgment to decide whether he’ll appeal.