A search committee that quietly has been looking for a new president for the University of Maryland has narrowed its choices to five candidates.

The five names, which the committee has refused to disclose, will be submitted to the university's board of regents for final selection. The new president will succeed Wilson H. Elkins, the university's president for 24 years, who will retire in June at the age of 70.

According to knowledgeable sources, the candidates are males, presidents or top administrators at large universities and currently not associated with the University of Maryland.

Their strengths are said to be proved managerial competence, ability to relate successfully to state legislatures (which in Maryland's case, funds 40 percent of the university's budget) and academic distinction.

According to Elkins, that individual needs first of all to be a salesman for the university, which is suffering from declining enrollments, low faculty morale and a poor image among state legislators. The university has 78,000 students on five campuses across the state.

The finalists were selected by secret ballot from nine candidates interviewed by the search committee. Two other candidates that the committee wanted to interview declined, including one woman who is said to be a top administrator at a large university. None of these names was disclosed, either.

Since Septmeber, the 26-member search committee has considered by secret ballot about 300 nominations for the post. About 40 candidates applied for the job, according to Lee Hornbake, the university's vice president for academic affairs who served as executive director of the search.

The regents may accept one of the candidates or reject all of them and pick a president of their own.

Several sources familiar with the search process believe that this latter alternative is unlikely unless some regents press for a president who is a University of Maryland "insider," or someone now at the school.

Last summer, after some debate, the regents approved a search procedure that would include various university groups. Frequently, such as in the recent search at Yale University, the institution's governing body (in that case, the Yale Corporation), reserves the presidential selection entiely for itself.

At Maryland, the regents, agreed that university administrators, faculty members, classified employes, alumni, athletic interests and students should serve along with six regents on the search committee.

Herbert Brown, the regents' 70-year-old chairman, became chairman of the search committee.

Brown, the outspoken regents' chairman, spurred the only public controversy over the search when he told a university audience last December that his choice would be a president who is "male, married, healthy and church-going." Immediately several university groups, including women's caucuses and students, called unsuccessfully for Brown's resignation.