John D. Ashcroft, the combative attorney general whose anti-terrorism policies made him the focus of a fierce national debate over civil liberties, resigned yesterday along with Commerce Secretary Donald L. Evans, one of President Bush's closest friends.

Ashcroft, 62, has been one of the most controversial and influential figures of Bush's first term. Ashcroft provided reliable fodder for Democrats on the campaign trail and served as a visible representative of the evangelical Christians who played a crucial role in reelecting the president.

Administration sources said Ashcroft's successor is likely to be White House counsel Alberto R. Gonzales.

In a five-page handwritten resignation letter to Bush -- dated Election Day but released yesterday -- Ashcroft took credit for declining crime rates and the absence of terrorist attacks on U.S. soil since Sept. 11, 2001. "The objective of securing the safety of Americans from crime and terror has been achieved," he wrote.

But Ashcroft, whose gallbladder was removed in March after he was hospitalized for pancreatitis, also wrote that the "demands of justice are both rewarding and depleting" and that "the Department of Justice would be well served by new leadership and fresh inspiration."

Bush said in a statement that Ashcroft "has worked tirelessly to help make our country safer" and has "transformed the department to make combating terrorism the top priority."

The resignations were the first departures from Bush's Cabinet since his reelection, and administration officials said they came for very different reasons. Ashcroft -- aware of the controversy he has provoked and, according to friends, exhausted after his illness -- preemptively offered his letter before the White House initiated a formal discussion about his future.

Evans, 58, often described as Bush's best friend, is eager to return to Texas to rejoin family members, who have already moved back.

A White House official said Bush considered Ashcroft's resignation at Camp David over the weekend and decided to accept it this week. Ashcroft said in his letter that it was handwritten "so its confidentiality can be maintained."

Picking Gonzales would give Bush tight control over the Justice Department. As governor of Texas, Bush put Gonzales on the state Supreme Court.

Administration sources said other contenders to replace Ashcroft include his former deputy, Larry D. Thompson, who would be the nation's first African American attorney general but has indicated he is not interested, and Marc Racicot, a former Montana governor who was chairman of Bush's reelection effort.

Ashcroft's deputy, James B. Comey; former New York City mayor Rudolph W. Giuliani; and New York Gov. George E. Pataki also are on the handicap lists of administration insiders. Most are considered more moderate than Ashcroft.

Ashcroft's nomination was the subject of a pitched battle in the Senate, which confirmed his appointment in February 2001 by a modest margin along partisan lines. In a message to Justice employees yesterday, Ashcroft said he will continue to serve as attorney general until his successor is confirmed.

Ashcroft, the son and grandson of Assemblies of God ministers, spent most of his political career as an attorney general, governor and U.S. senator in Missouri. He explored a run for president in 1998 as the candidate of the religious right.

Ashcroft became the nominee for U.S. attorney general after losing his reelection bid in November 2000 to another former Missouri governor, Mel Carnahan. Carnahan died in an plane crash weeks before the election, and his wife, Jean, served in his stead.

Ashcroft was thrust into a central role after the Sept. 11 terrorist attacks. He presided over a federal dragnet that apprehended and deported hundreds of Arab and South Asian foreign nationals on immigration violations but resulted in relatively few convictions for terrorism.

Ashcroft helped shepherd through Congress a package of stringent anti-terrorism measures, the USA Patriot Act, and used the new powers to dramatically restructure the missions of the FBI and the Justice Department, which became primarily focused on thwarting another attack.

Ashcroft came under persistent assault from Democrats, civil libertarians and even some Republicans, who questioned the Justice Department's use of secretive court proceedings and aggressive surveillance and search techniques. The Supreme Court rebuffed one of the department's central anti-terrorism strategies, ruling in June that men detained indefinitely without charges as enemy combatants by the U.S. military are entitled to lawyers and access to U.S. courts.

Anthony D. Romero, executive director of the American Civil Liberties Union, compared Ashcroft to A. Mitchell Palmer, who oversaw raids targeting thousands of alleged radicals as attorney general in the Woodrow Wilson administration.

"This attorney general has been one of the most divisive forces in the Bush administration," Romero said. "His legacy will show that he was one of the worst attorney generals in American history, with an outright hostility for civil liberties and overt disdain for critics. . . . If President Bush wants to make good on his promise to unite the country, he can do no better than to start with the attorney general."

But leading Republicans argue that Ashcroft helped transform the Justice Department and FBI at a time when the United States is under persistent threat of attack from al Qaeda and other terrorist groups.

"His service came at a challenging time in our history," Senate Majority Leader Bill Frist (R-Tenn.) said in a statement. "His dedication and commitment to fighting the war on terror has been critical to ensuring the safety . . . in our homeland."

A longtime friend of Ashcroft's expressed bitterness that the White House had originally welcomed him as a lightning rod who drew criticism away from Bush, then decided not to stand by him. "He was something to offer to evangelicals," said the friend, who declined to be identified. "They used him, and now they're done with him and he's being tossed aside."

In his letters to Bush and to Justice employees, Ashcroft focused in part on accomplishments other than fighting terrorism. They include, he said, more prosecutions of gun crimes, a crackdown on drug trafficking, and the convictions of executives at Enron, WorldCom and other companies for corporate crimes.

Ashcroft pushed the envelope on many hot-button issues. His department endorsed an expansive interpretation of the Second Amendment right to bear arms and sought to gain access to edited records of abortion patients from the Planned Parenthood Federation of America as it defended the Partial Birth Abortion Ban Act in a lawsuit.

On many issues, Ashcroft's responses to criticism were often confrontational. He told a stunned Senate Judiciary Committee in December 2001 that criticism of government tactics "only aids terrorists," and said two years later that librarians worried about FBI surveillance powers were "hysterics."

This April, Ashcroft, testifying before the Sept. 11 commission, characterized a legal memo written by one of the panel's Democratic members as the "single greatest structural cause for the September 11th problem." The bipartisan commission and many legal experts disputed the claim.

Ashcroft plans to give speeches, join corporate boards and perhaps work with universities, administration officials said.

Research editor Lucy Shackelford contributed to this report.