CANBERRA, Australia - The doctor accused of supporting the foiled car bomb attacks in London and Glasgow was kept in custody Monday after the government invoked immigration laws to keep him behind bars despite a magistrate's ruling granting him bail.

Immigration Minister Kevin Andrews told reporters in Canberra that he had canceled Mohamed Haneef's working visa on suspicion he had links to criminals.

Haneef, an Indian national who came to Australia from Britain last year, would be taken into immigration custody soon, Andrews said.

Haneef, 27, was charged Saturday with providing support to a terrorist organization by giving his mobile phone SIM card to British suspects Sabeel and Kafeel Ahmed when he moved to Australia in July 2006.

Earlier Monday, a magistrate granted Haneef bail, saying that authorities had not shown a clear link between him and the plot.