Alberto Gonzales, the controversial US attorney-general whose competency and honesty were questioned by Republicans and Democrats alike, has announced he will resign his position as the United States' top law enforcement official. Gonzales is a longtime friend and political ally of US President George W. Bush, who defended him to the end. "His good name was dragged through the mud for political reasons," Bush told reporters. But Gonzales's announcement Monday drew expressions of relief from Republicans who saw him as a further embarrassment to a beleaguered administration burdened by the unpopular Iraq war. Democrats pledged to press ahead with their investigation into whether Gonzales improperly fired federal prosecutors in collaboration with the White House and for political reasons. Bush is losing, effective September 17, perhaps his most loyal cabinet member, whose public career has been closely linked to Bush's. At the end, Bush was having to respond to the demands of both Republicans and Democrats that Gonzales resign over the botched handling of FBI terror investigations and the prosecutors' dismissals. Bush had stood defiantly by his friend and told reporters Monday that he accepted Gonzales's resignation reluctantly. "After months of unfair treatment that has created a harmful distraction at the Justice Department, Judge Gonzales decided to submit his resignation, and I have accepted his decision." Bush named Paul Clement, the top government lawyer as solicitor general, as a temporary replacement. With less than 18 months remaining in office, there was no indication when he would name a permanent replacement or how quickly the Senate might confirm one. Speculation about a successor began immediately, and included Homeland Security Secretary Michael Chertoff; Asa Hutchinson, former head of the Drug Enforcement Administration; former solicitor general Ted Olson; and Larry Thompson, who was the second-ranking official at the Justice Department in Bush's first term. Apart from the president, there were few Republican expressions of regret after the departure of Gonzales, the nation's first Hispanic attorney general, a man once hailed as the embodiment of the American Dream. "Our country needs a credible, effective attorney general who can work with Congress on critical issues," said Republican Sen. John Sununu, who last March became the first lawmaker from Bush's party to appeal to Gonzales to step down. Sen. Chuck Grassley, another Republican, added, "Even after all the scrutiny, it doesn't appear that Attorney-General Gonzales committed any crimes, but he did make management missteps and didn't handle the spotlight well when they were exposed." Democrats were considerably less charitable. Under Gonzales and Bush, "the Department of Justice suffered a severe crisis of leadership that allowed our justice system to be corrupted by political influence," alleged Democratic Sen. Patrick Leahy, who has presided over the investigation into the firings of eight prosecutors who Democrats say were axed for political reasons. Sen. Harry Reid, leader of the Democratic majority in the Senate, said the investigation would not end with Gonzales' departure. "Congress must get to the bottom of this mess and follow the facts where they lead, into the White House," Reid said. Gonzales also has struggled in recent months to explain his involvement in a 2004 meeting at the bedside of then-attorney-general John Ashcroft, who had refused to certify the legality of Bush's no-warrant wiretapping program. Ashcroft was hospitalized in intensive care at the time. More broadly, the attorney general's personal credibility has been a casualty of the multiple controversies. So much so that Sen. Arlen Specter, senior Republican on Leahy's Judiciary Committee, told him at a hearing into the dismissed federal prosecutors that his testimony was "significantly if not totally at variance with the facts." Gonzales made a brief appearance before reporters at the Justice Department to announce his resignation. Despite his tribulations, said Gonzales, the son of illiterate migrants, "Even my worst days as attorney general have been better than my father's best days."