RICHMOND, OCT. 16 -- The president of Virginia Tech, which has been criticized by the governor and its alumni because of alleged illegal recruiting and substandard academic performance of some of its athletes, resigned today.

William E. Lavery made no mention of those problems in announcing his resignation in a letter distributed this afternoon to faculty and staff members on the Blacksburg campus, in the southwestern part of the state.

However, his announcement came after months of controversy and just two weeks after the resignation of Charlie Moir, Tech's longtime successful basketball coach. Earlier this week, the school's faculty senate postponed action on a resolution expressing a "lack of confidence" in Lavery.

Lavery's job has been on the line since June, when Gov. Gerald L. Baliles, speaking at Tech's commencement, warned, "I expect academic endeavor to hold unrivaled priority -- without exception."

Baliles bemoaned "misspent financial resources, million-dollar coaching contracts and lavish expense accounts . . . that invite unethical conduct and humiliating publicity." The speech was greeted by cheers from many of the 5,000 graduates and 25,000 guests.

His speech came after the reports of illegal recruiting and the bitter departure of two athletic directors, a position that remains vacant. Further, the semiautonomous booster organization that runs Tech's football and basketball programs had accumulated a $4 million debt.

Baliles said at the time that he was not calling for Lavery's dismissal. The next month, however, Baliles gave a similar "academics over athletics" charge to four new appointees to the board of visitors, the school's governing body. Tech "is not among those universities with the worst problems nationally, but 12 NCAA violations are 12 too many," he said, referring to a report handed down earlier in July by the National Collegiate Athletic Association, which polices athletics.

Chris Bridge, the governor's press secretary, said yesterday that Lavery's announcement was unexpected.

Lavery has headed the state's largest university for 13 years, and was previously on the administrative staff for eight years. The school has 22,000 students; one-fourth of them are from Northern Virginia.

Lavery left the campus after distributing his letter of resignation and was not available for comment. His letter said that he told W.S. (Pete) White, the rector of the board of visitors, of "my desire to step down as president" and requested that a presidential search begin as soon as possible.

Lavery said he would serve "at the board's pleasure until the new president is in place."

The NCAA is considering sanctions against Tech for violations in both its basketball and football programs. Within the last year, Bill Dooley, who was both football coach and athletic director, quit after an out-of-court settlement of his $1 million lawsuit against Tech. His successor as athletic director, Dale (Dutch) Baughman, quit after only a few months.

Basketball coach Moir's program initially was investigated without the knowledge of the athletic department; Moir left after agreeing to an undisclosed settlement for the two years remaining on his contract.

Without specifically mentioning the athletic troubles, Lavery said the past months have been "agonizing . . . for all of us," and urged the university community "to begin the healing."

White, a Columbus, Ohio, business executive and Tech alumnus, said he accepted Lavery's decision "with great regret."

During Lavery's tenure, Tech "emerged as a comprehensive research university with a national reputation," said White, pointing to $70 million in research being conducted on the campus and $108 million in private funds raised during a "Campaign for Excellence" between 1984 and 1986.

At last month's opening of the academic year, Lavery repeated a pledge to place the athletic association, of which he is a member, under direct university control, and to adopt strict standards to prevent repetition of grade fixing and a poor graduation rate among scholarship athletes.

"I accept responsibility for what has happened. I cannot do otherwise. Nor do I want to," he told Tech's administrators. And he added, "I also accept responsibility for correcting the problems, even though the survival rate of presidents who attempt to do so is impressively low."