The Australian government has been criticized by civil rights groups and legal organizations for its bungled arrest and subsequent release of Dr. Mohamed Haneef in July.
“The minister cancelled the visa ... by applying the wrong test. It follows that the decision must be set aside,” said Federal Court Judge Jeffrey Spender in Brisbane.
The judge's decision, referring to Immigration Minister Kevin Andrews, was posted on the Federal Court's website.
Mr. Andrews said the government would appeal against the ruling.
“When I made the decision to cancel Dr. Haneef's visa, I made it in the national interest and I stand by that decision,”
Mr. Andrews told reporters in Sydney. “I have instructed the Australian government solicitor to lodge an appeal.”
Dr. Haneef, 27, was held for 11 days before being charged with recklessly supporting terrorism in a case centred on the loan of a mobile phone SIM card to a relative in Britain allegedly linked to car bombs in London and Glasgow.
The charges were dropped because of lack of evidence, but the government cancelled Dr. Haneef's visa and he flew home to Bangalore to see his wife and newborn daughter.
Dr. Haneef has denied any knowledge of the plot and his arrest ignited concerns about Australia's new counter-terrorism laws.
Dr. Haneef, who worked in a Gold Coast hospital in Queensland state, has said he would like to return to Australia.
Judge Spender rejected the minister's decision to cancel Dr. Haneef's visa on “character grounds” based on his association with two cousins who were terrorist suspects.
He said Dr. Haneef's visa could have been cancelled if the minister had used the fact that British police regarded Dr. Haneef as a person of interest in relation to the bombings and that Dr. Haneef had been formally charged with terrorism offences.
“These matters would have permitted the minister to conclude that the association between Dr. Haneef and the Ahmed brothers [his cousins] went beyond a purely familial, social, innocent relationship,” said Judge Spender.
“On that material, it would have been open to the minister ... to cancel Dr. Haneef's visa,” he said.
Dr. Haneef's visa is not automatically reinstated and the court in Brisbane ruled that the Australian government has 21 days to decide what action to take.