U.S. Education Secretary Terrel H. Bell yesterday urged the University of Maryland's president and board of regents to stiffen entrance requirements for undergraduates and prune excessive doctoral programs to ensure that the university avoids "drifting toward mediocrity."

In what he termed "a highly opinionated sermon," Bell said that university officials should risk political battles with the state legislature and "encourage a certain quality of students to go to community colleges" instead of to one of Maryland's five campuses.

Bell's remarks, at a four-hour public hearing in College Park on the university's future, came just as university officials complete a five-year study designed to upgrade Maryland's national standing among public institutions.

"The problem you face is that if the university is going to carry out its mission of becoming an exemplary institution, you need to be teaching on a level that is challenging to capable students," Bell said. "That sounds like elitism. I don't think any youngster ought to be denied educational opportunity . . . . But Maryland ought to be careful about not getting into remedial work on a massive scale."

Bell also suggested that Maryland and other multi-campus universities add more liberal arts requirements for undergraduates.

While most of the regents and other university officials welcomed many of Bell's suggestions, President John Toll said he thinks current admissions standards, which have been raised several times in the past five years, are sufficient.

"I don't think we want to be one of the top 10 universities in exclusivity," Toll said, in a reference to his oft-stated goal of making Maryland one of the 10 best public universities in the nation.

Historically, efforts to toughen admissions requirements have hit political snags. often generating complaints that many minority students get inferior secondary educations and, as a result, perform less well than whites on achievement tests used as measures for admission.

Toll, sensitive to the political fallout on the admissions issue, said yesterday that the university, which had no black students until the U. S. Supreme Court's 1954 desegregation order, is "determined not to let our raising of admissions standards undercut our affirmative action programs."

Bell said public universities such as Maryland could improve their reputations and their academics by cutting the number of doctoral programs and picking a few in which to excel. And he said the regents, like other governing bodies, should not let the legislature "set the agenda" for admissions requirements, faculty salaries, and the breadth of doctoral progams.

"You might get into some hot water, but it's the kind of hot water you ought to wade into," he said.

Albert Bowker, dean of the university's school of public affairs, said Maryland now ranks 14th nationally among public schools in research and graduate programs. Bowker, the former chancellor at the University of California at Berkeley, considered the top public university in the country, said Maryland needs to raise its faculty salaries and spend roughly $4 million to improve its research libraries in order to compete at a higher level.

Toll said progress is being made. He noted that the number of National Merit Scholars enrolled increased six-fold in the past five years, and he wants the figure to double in the next five.