"But I have done so because I recognise that the Office of the Commonwealth Ombudsman's enduring strength lies in community confidence in its integrity." Mr Asher's resignation comes after the government told him he had lost its confidence for colluding with the Greens. Emails released last week showed he had written questions for the Greens Senator Sarah Hanson-Young about the conditions inside immigration detention centres and the lack of funding that prevented his office from performing its immigration overwatch role. Senator Hanson-Young then asked Mr Asher those scripted questions when he appeared before a Senate estimates committee in May. In announcing his resignation, Mr Asher said he had always acted "in the interest of those I have served and to bring about meaningful, broad ranging and long-term reforms to public administration".

"However, I accept that my actions prior to the May 2011 budget estimates hearing caused many in the community and the parliament to call into question the impartiality of my office," he said. "I regret deeply that my office's reputation may have been damaged by my actions and apologise sincerely to my staff and to our clients. "However, I do hope that some good will come of this incident by way of public discussion and debate about future funding and an appropriate accountability mechanism for the Commonwealth ombudsman." The Prime Minister, Julia Gillard, said this morning that Mr Asher was yet to explain his actions adequately. The development came after days of pressure. The Greens accused the major parties of waging a vendetta against Mr Asher because he tried to tell the truth about conditions inside immigration detention centres.

The Greens will try to set up a formal process for the Ombudsman to vent his concerns. But it will be too late to save Mr Asher, who met the Special Minister of State, Gary Gray, yesterday. Mr Gray informed him personally of the government's displeasure at his actions and is believed to have told him that he no longer had the confidence of the government. Similarly, Mr Asher was delivered the same message on Tuesday when he met the Secretary of the Department of Prime Minister and Cabinet, Ian Watt. Mr Asher is a statutory independent officer and can be dismissed only by a vote of the Parliament.

But with the government losing confidence in him and the opposition also criticised him publicly, his position became increasingly untenable. The Greens leader, Bob Brown, said Mr Asher was being pilloried by both major parties for speaking out about detention centre conditions and the lack of funding that made it impossible for his office to conduct an adequate overwatch role. "He is being hectored now by the big parties because they don't like his courage in speaking up about their failure of policy on asylum seekers; that's what this is about. "It's not the Ombudsman becoming political. It's the big parties defending the indefensible when it comes to their failed asylum seeker policies." Senator Brown said Mr Asher had erred by colluding with the Greens but "if you want infallibility, get the Pope".

Mr Asher has already apologised for his actions which he conceded were unwise and had the potential to compromise the independence of his office. But he pleaded he had no other way to voice his concerns. Senator Brown will introduce a bill next week giving the Ombudsman the same access to a parliamentary committee as the Auditor-General to air concerns. The Liberal Senator, Eric Abetz, who was embarrassed in 2009 for colluding with former Treasury official Godwin Grech before a Senate estimates hearing, said the Greens were trying to justify the Ombudsman's behaviour in retrospect. "The Greens are trying to imply that the Ombudsman had no other option but to write ... questions for Senator Hanson-Young when, in fact, he did." Mr Asher, a Sydney-educated barrister and long-time consumer advocate in Australia and Britain, began his five-year appointment on August 30 last year, replacing Professor John McMillan, AAP reports.

Mr Asher said he would consider making further comment in due course. He said he was proud of his office's investigations into the school chaplaincy program, interpreters for indigenous Australians, tax file number compromises, how agencies engage with people suffering from a mental illness and review rights for people under income management. Loading • The role of the Ombudsman's office is to act as a watchdog and investigate complains about government agencies and their administration. The office can handle complaints, conduct investigations, perform audits and inspections, and carry out specialist oversight. Phillip Coorey is the Herald's Chief Political Correspondent