The American University of Beirut, an oasis of knowledge and enlightenment in the Middle East for 120 years, is now showing the strains of an institution under siege. Although its gates will remain open, the exodus of foreign and Lebanese professors -- spurred by the anarchy of terrorism -- is certain to strip the university of its once-envied standards of education.

For decades, the picturesque campus of aging stone buildings, majestic trees, and palm-shaded benches has produced respected specialists, scientists and historians.

During the long 11 years of civil war, the university has never missed a semester. "It is not surprising that AUB is in such a mess," said John Monroe, an English professor. "The miracle is that it stayed open."

But few university officials believe the university will be able to maintain its high educational standards in a country struggling with religious fundamentalism, violence and a political void.

Once known as the Paris of the Middle East, the Moslem-controlled section of Beirut, where the university sits, is now ruled by an assortment of militias, gangs and clandestine groups.

The faculty has become a target. A British professor was shot and killed in 1985. Last week the school's librarian, Peter Kilburn, who was kidnaped in 1984, also was killed.

The dean of the school of agriculture, Thomas M. Sutherland, and the director of the American University Hospital, David P. Jacobsen, both Americans who were kidnaped in 1985, are still being held by the Islamic Jihad, one of the most active extremist groups. Brian Keenan, a teacher from Ireland, has been missing since April 11.

But in a country where street violence is daily fare, it is not the latest abductions and assassinations that professors fear will force the institution to shut its doors. What they fear, instead, is that the western tradition of a liberal education will not survive the changes that have taken over the city.

Demographic shifts in the last decade have altered the face of West Beirut. People from the mountains and Shiite Moslems from the south have moved in. The Christians and many middle class residents have moved out. University enrollment trends have changed accordingly. The concern is that the university's international outlook may buckle to more partisan local influences.

"AUB cannot possibly maintain its standards without foreign input both for academic and language reasons," said an English teacher who evacuated this week.

In prewar days, one-third of the university's 450-member faculty were foreigners. Now only 10 foreign teachers remain. "Most of the instruction will be carried on by people with Masters' degrees from AUB," said Phil Grant, a political science professor from California who reluctantly sailed to Cyprus this week. "It will be an inbred institution."

The university faces financial problems as well. Its budget deficit this year is $13.5 million. Departments are being scaled down. Some, such as biology, chemistry and English, have been left with only one or two professors.

As a result, professors expect to turn out fewer doctoral students in science fields. It is also likely, said one English teacher, that the university will begin teaching in Arabic.

"We just have to turn ourselves into a different kind of university if we are going to stay in business," said a professor.

It is not only foreigners who are fleeing the university. Lebanese are leaving as well. In the past two years, 60 professors have left the medical school, some for security reasons, some to make more money abroad.

Others have grown tired of working in a combat zone. This week, for only the second time since the civil war started in 1975, the staff closed the emergency room. The doors shut after a militia member roughed up a doctor who refused to give him a false medical report.

Such intimidation is familiar. Some students have used their friends in the militia to threaten teachers into giving them better grades.

The efforts of the Shiite and Moslem militias to protect the university have been ineffective and often counterproductive. "We are supposed to have tight security," said one professor. "But any security system is as good as the people providing it."

The last time university president Calvin Plimpton visited the campus, he was surrounded by eight bodyguards.

"Dormitory halls for men, where pillow fights were once frowned upon by university guards, are now like an arsenal, with students hiding Kalashnikovs under their beds," the professor said.

Like many of the university's dedicated staff, Abu Haidar, though married to an American, has decided to stay and fight for the university's survival. "I could go to the U.S., but I am not needed there. . . I can say I have more to live for here and more to give."

Despite the problems, the Americans who are leaving the university have no regrets about the time they spent here. Said professor John Monroe: "I feel very proud to have been identified with an institution which did go on despite the odds."