Stanford University President Donald Kennedy, buffeted by months of high-profile controversies--especially the university's spending of federal research money--announced his resignation Monday.

Kennedy's decision to step down in August, 1992, was detailed in a letter to Stanford's Board of Trustees.

"At present we are talking too much about our problems and too little about our opportunities," Kennedy said in the letter. "And, to be quite frank about it, there is entirely too much speculation about my future at Stanford. It is very difficult, I have concluded, for a person identified with a problem to be the spokesman for its solution."

Stanford's centennial year was marred in March by congressional hearings alleging that the university improperly billed the government for research expenses by as much as $200 million during the last decade. Investigators found that the university had charged the government for part of the costs of such items as a yacht, antiques for the Kennedy residence and for repairs to widen his bed.

After defending the spending, Kennedy apologized. The university has refunded $1.35 million to the government and last week announced a package of in-house reforms.

But the damage had been done. In addition to the refund, the government slashed $23 million from the university's annual research budget, which totaled $260 million during the last fiscal year.

The man who last spring told The Times he had "not for a millisecond" considered "leaving the scene of the accident" began to have second thoughts.

In a telephone interview Monday, Kennedy said he began to do some "serious reflection" on his future after commencement ceremonies marked the close of the tumultuous school year about six weeks ago. He said he conferred with about two dozen faculty members, trustees and "friends of Stanford."

Kennedy said he was not forced to resign. "Undoubtedly there were some (trustees) who thought it was the right thing to do and some who might have preferred that I stayed on," he said.

Some Stanford officials thought that Kennedy would have retired this year even if there had been no funding scandal, citing his 10 years in office and successful centennial year fund-raising drive.

Kennedy, 59, who was a tenured professor in biology before assuming the presidency in 1980, said he plans to stay at Stanford and work on environmental causes.

"I want to help make Stanford the university for academic and policy studies in this arena," Kennedy said.

Until the government's investigation, Kennedy had enjoyed a solid reputation.

"No president in the post (World War II) period did more to reach out to students," said Bob Beyers, the former campus news director who quit two years ago in a dispute over the content of his news releases but who nonetheless praised Kennedy.

"I think it will be extremely difficult for the university to find an equally energetic president," Beyers said. He cited many Kennedy accomplishments, including improving undergraduate education and attracting more minority students and faculty members.

The research funds scandal was the biggest controversy to hit the university this year but not the only one. In May, award-winning lecturer Stuart Reges was fired for violating the school's anti-drug policy by carrying illegal drugs on campus. In June, Dr. Frances Conley, a leading neurosurgeon and tenured professor resigned from the university's medical school, alleging sexism by her colleagues.

Conley said in an interview that she does not blame Kennedy and feels that he has done "a super job."

Kennedy weathered controversies over Stanford's continued ownership of land leased by a farming operation that uses migrant labor, for the university's investments in companies that did business with South Africa, and for his relationship with the Hoover Institution. He sometimes tangled with the political right as well, including a dispute with then-Education Secretary William J. Bennett over adding non-Western material to Stanford's required freshman humanities courses.

But the articulate, former Food and Drug Administration chief also had his triumphs--and his supporters.

He presided over a successful drive to raise $1.1 billion for buildings and helped the university's endowment triple to almost $2 billion. He also drew praise for his efforts to insist that professors put more emphasis on teaching and less on research.

Despite the controversies, and months of speculation about his future, Kennedy's resignation came as a surprise to many, including critics and supporters.

James Gaither, chairman of the Board of Trustees, told the Associated Press that the board was shocked to receive Kennedy's resignation. Gaither said Kennedy appeared before the board Monday morning to submit his resignation, and the board accepted it. He then returned to the board's meeting in the afternoon, giving a 30-minute speech and receiving a standing ovation.