FBI Director Louis J. Freeh announced yesterday that he will resign in June, ending an eight-year tenure that was marked by the transformation of the FBI into a global crime-fighting agency but also by a series of embarrassments that included the recent arrest of a counterintelligence agent alleged to be a longtime spy for Moscow.

Freeh made the announcement at a meeting of top FBI personnel. He gave no reason for leaving the high-profile law enforcement post two years before the end of his 10-year term and no hint at what he plans to do next.

But in a written statement, Freeh twice noted that he and his wife, Marilyn, are the parents of six sons who range in age from 3 to 16. In the past, he has joked about the financial pressures of living on the FBI director's salary of $145,100 a year with a large mortgage and imminent college costs for his oldest son.

President Bush, Attorney General John D. Ashcroft and key members of Congress issued statements praising Freeh for what Ashcroft called a "legacy of uncompromising integrity."

"Louis Freeh is a dedicated public servant who has served his country and the FBI with honor and distinction," Bush said. "I regret the director is leaving government. We are fortunate to have had a man of his caliber serve our country, and we will miss him."

Bush said Freeh informed him of his intention to resign at a White House meeting Monday afternoon. "It did catch me by surprise," Bush said. "And I'm disappointed. I was hoping that he would stay on. I think he's done a very good job."

An FBI official said that there was a widespread expectation in the bureau that Freeh would leave before the end of his term, primarily because of financial need. But when Freeh met yesterday with about 70 senior aides, he also caught them by surprise, the official said.

"Everybody in the room was absolutely stunned," he said. "Everybody knew that this moment would come, but they were in disbelief when it did come."

By law, Freeh's successor will be appointed to a new 10-year term that would extend beyond even a second Bush term in the White House. Immediate speculation about a successor included Oklahoma Gov. Frank A. Keating (R), a former FBI agent and Justice Department official, and Jack C. Lawn, another former FBI agent who has also headed the Drug Enforcement Administration.

Other names circulating as potential candidates included former Montana governor Marc Racicot (R) and Ray Kelly, a Democrat and former head of the Customs Service.

A White House official said the president will consult with Ashcroft on the naming of a successor. The official said the White House would move "as quickly as possible" but declined to offer a timetable. Bush and his advisers have not begun to deliberate on a replacement, but they "keep people's names in mind just in case," the official said.

Freeh was effusive in his praise of Bush, crediting him with bringing "great honor and integrity to the Oval Office." He also praised Vice President Cheney for his "dedication to duty in serving the nation" and Ashcroft for "the strong support he has provided to the men and women of the FBI."

In contrast, Freeh offered brief, one-sentence words of thanks to former president Bill Clinton, who appointed him in 1993, and former attorney general Janet Reno, with whom he frequently clashed.

Tension with the Clinton White House simmered throughout Freeh's term, much of it centered on allegations of campaign finance wrongdoing by the Clinton campaign and the Democratic National Committee during the 1996 election cycle.

In a confidential memo that became public more than two years after he wrote it, Freeh urged Reno to appoint an independent counsel to investigate Democratic fundraising practices in the 1996 election. But Reno, relying on the advice of career Justice Department officials, refused to do so, deepening the impression that she and the FBI director were at odds.

Last year, sources said that intermediaries were exploring higher-paying private-sector jobs for Freeh and that the FBI director had been approached by several firms with offers of jobs with seven-figure salaries.

In his statement yesterday, Freeh said, "I have neither engaged in negotiations regarding any future employment nor have I requested others do so on my behalf while serving as director. As for the future, I look forward to spending the summer with my family and engaging in new challenges."

Freeh, 51, who began his career in 1975 as an FBI agent, leaves the bureau in the wake of the worst case of espionage in the bureau's history -- though his resignation did not appear to be linked to the scandal. Senior FBI counterintelligence agent Robert P. Hanssen allegedly spied for Russia over the past 15 years, compromising countless national security secrets and helping Moscow find two moles who were executed. Hanssen was arrested in February after allegedly dropping off secret documents for Russian agents in return for $50,000 in cash.

Under pressure to tighten security, Freeh agreed to polygraph 500 people with access to intelligence information, a tactic he had long resisted.

The Hanssen case shook the FBI, but in an interview last week, Ashcroft expressed strong confidence in the bureau's director and praised his handling of the case. "When we needed to take steps toward apprehension, we were still in a system that was secure and could operate effectively," Ashcroft said.

There have been other crises on Freeh's watch, including allegations -- later proved unfounded -- of a cover-up in connection with the FBI assault on the Branch Davidian compound near Waco, Tex., in which 75 people died. There were massive problems with the FBI crime lab and the mishandling of the Atlanta Olympic bombing case.

The FBI was condemned for its handling of the investigation into whether former Los Alamos Nuclear Laboratory scientist Wen Ho Lee mishandled nuclear secrets. Lee, indicted on 59 felony counts, ultimately pleaded guilty to a single count in a plea bargain.

Freeh, who proved to be an adroit political operative, withstood the attacks that followed each episode, maintaining strong ties to the key lawmakers who oversee his agency.

Freeh's legacy at the bureau may be his transformation of the domestic crime-fighting organization into a global entity that now has permanent offices around the world. The globe-trotting FBI director more than doubled the number of foreign countries where FBI agents are permanently based, to 44, and visited 68 countries himself.

Last week, Freeh was in Africa meeting with government leaders to establish new international partnerships, offering law enforcement training and forensic assistance.

Freeh is also credited with greatly improving the FBI's ability to counter terrorist threats.

He will be remembered in the intelligence community for altering the FBI's working relationship with the CIA, which long had been strained.

"Director Freeh's vision, leadership and commitment have been directly responsible for the unprecedented strategic partnership between the FBI and the CIA," CIA Director George J. Tenet said. "Very significant successes in the counterterrorism and counterintelligence areas . . . are evidence of the remarkable cooperation that has existed between our two agencies in recent years."

On Capitol Hill, lawmakers yesterday saluted Freeh's tenure at the FBI. Senate Judiciary Committee Chairman Orrin G. Hatch (R-Utah) described Freeh as "one of the best FBI directors to serve the American people." Sen. Patrick J. Leahy (D-Vt.), ranking Democrat on the committee, said that Freeh "will leave the bureau with an updated attitude appropriate to 21st-century law enforcement."

Sen. Charles E. Grassley (R-Iowa), a frequent critic of Freeh's, praised the director's "commitment and dedication," but said he was "less successful when he resisted constructive criticism of his own organization."

Freeh began his law enforcement career in 1975. He later joined the U.S. attorney's office in New York, winning praise for directing a complex drug trafficking investigation and prosecution. In 1991, former president George Bush appointed him a U.S. district judge.

Bush administration officials said Freeh is most likely to stay in the Washington area or move back to New Jersey, where he lived while working in New York.

Staff writer Dana Milbank and the Associated Press contributed to this report.