First the Federal police had to retract posthaste on slapping terrorism charges against Haneef, as there was not enough conclusive evidence. Then a court quashed the cancellation of Haneef's visa on character grounds.
All the efforts of an overeager Australian government to implicate Haneef in the failed Glasgow bombing came to naught, but Immigration minister Andrews would not give in.
With national elections not far off and the ruling coalition's chances considered dim, the government has to go all out to project itself as the only guardian of the country's interests. Hence the latest manouevere by Andrews, it is felt.
The appeal claims that he was right to cancel the Indian doctor's visa on character grounds as outlined in the Migration Act because of his "association" with suspected terrorists.
In point of fact Andrews ordered revocation of the work visa only after a Brisbane magistrate granted Haneef bail. The idea was to keep Haneef in custody indefinitely, but then the revocation itself was held illegal.
In a 74-page judgment delivered last month, judge Jeffrey Spender had ruled that the term "association" should not include mere social, family or professional relationships.
Dr Haneef's lawyers had argued that their client had only an innocent association with his second cousins, Sabeel and Kafeel Ahmed. Kafeel died last month after suffering burns to 90 per cent of his body in the Glasgow airport attack on June 30.
Lawyers for the Government argue in the appeal papers, lodged with a full bench of the Federal Court in Brisbane yesterday, that Justice Spender should have found that the connection between Dr Haneef and the Ahmeds was "both more than accidental (such as familial) and involved intentional or deliberate interaction with those persons so engaged in the criminal activity."
In a statement, Mr Andrews said yesterday he stood by his earlier decision and had made it "in the national interest."
He argued that Justice Spender should have followed the interpretation of the act provided by Federal Court judge Arthur Emmett in the Chan case of 2001. Justice Emmett found that "neither knowledge of associate's criminality or guilty participation is necessary for a person to fail the character test", when asked to rule whether Wai Kuen Chan failed the character test because her former husband was a member of a criminal gang.
Even that ruling is considered weak and the government had invoked it during the visa hearing, in vain, as it turned out.
Now Andrews is persisting with that line in his appeal too. He also said the Government had also applied for an extension to the stay on Dr Haneef's visa.
Interestingly the opposition Labour too prefers to play it safe. Its Immigration spokesman Tony Burke would only reiterate the party's call for a judicial inquiry into the case.
A hearing date has not been set for the appeal.