An Indian doctor held in Australia over suspected failed bomb attacks in the UK is to be kept in custody despite a magistrate's ruling granting him bail.
Haneef appeared in court on Monday for his bail hearing
Officials said that Mohammed Haneef, 27, would remain in detention under Australian immigration law.
Dr Haneef was charged on Saturday with providing "reckless support" to a terrorist organisation.
He is alleged to have given a mobile phone SIM card to two suspects in the UK attacks. He denies any involvement.
Earlier on Monday, a judge in Brisbane freed Dr Haneef on bail of A$10,000 (£4,300).
Magistrate Jacqui Payne said that prosecutors had failed to provide evidence of a direct link between Dr Haneef and a terrorist organisation.
But Immigration Minister Kevin Andrews then announced that he had cancelled the doctor's working visa because of suspected links to criminal activity.
"I reasonably suspect that he has or has had an association with persons engaged in criminal activity, criminal conduct, namely terrorism in the UK," he told a news conference.
"I am satisfied that the cancellation is in the national interest."
Dr Haneef would be taken into immigration custody if the bail money was paid, he said.
His case has now been adjourned until 31 August.
The doctor was stopped at Brisbane airport on 2 July as he tried to leave for India.
Three people have been charged so far in connection with the attacks in London and Glasgow.
Two other men arrested in connection with the attacks have been released without charge. An inquiry was launched after two cars with petrol, nails and gas cylinders were found in London on 29 June.
A day later, a burning car loaded with gas cylinders was driven into the main terminal building at Glasgow's international airport.