LARNACA, Cyprus (AP) _ Foreign evacuees who sailed here Monday from Lebanon said the murders of three kidnap victims after last week's U.S. air raids on Libya convinced them it was time to quit the violence-ravaged country.

''The last days were tense for all of us,'' said Sebastian Usher of Britain as he stepped off the ferry at Larnaca in southern Cyprus. ''We were virtual prisoners, under house arrest. It was time for us to leave.''

Evacuation of the more than 20 Britons and other foreigners from west Beirut, a battleground for Moslem militias, followed pleas from the British and other embassies for their nationals to stay out of sight as much as possible.

The evacuation was arranged after the bodies of a kidnapped American and two Britons were found last Thursday in mountains east of Beirut and British television journalist John McCarthy was abducted.

The slain hostages were Peter Kilburn, 62, of San Francisco, a librarian at the American University of Beirut, and British teachers Leigh Douglas, 34, and Philip Padfield, 40. Kilburn was kidnapped in December 1984 and the other two were seized late last month.

Thirty-five British residents left west Beirut on Sunday, escorted by Lebanese soldiers, for the safer Christian sector in the eastern part of the city. Most sailed for Cyprus on Monday from the Christian-controlled port of Jounieh north of Beirut.

Christopher Alexander, 12, and his sister Helen, 10, said they were sorry to leave and Helen said she would ''love to go back'' someday.

''The Lebanese are very nice people but there were some who ruined it for us,'' Christopher said. ''We were frightened.''

Peter Gerrard, 40, of Dublin, Ireland, a teacher at American University, said: ''We realized we were on the firing line. We were expecting to be kidnapped any time. We were told imperatively to stay on campus.''

Usher, 23, who also taught at the university, said he shared an apartment with Brian Keenan, an Irish teacher kidnapped two weeks ago. It became impossible for Westerners to remain in Beirut after the latest outburst of violence.

''We couldn't walk in the streets,'' he said.

Even as the ferry sailed from Jounieh for the eight-hour crossing, Usher said, he was afraid it would be attacked.

The few foreigners who remain in west Beirut ''may be brave or foolish,'' Gerrard said.

American University, which once had more than 80 foreign teachers, now has but a dozen. Spokesman Radwan Mawlawi said Lebanese faculty members would be hired.

Moslems spoke out Monday in Beirut against the kidnappings.

Walid Jumblatt, the Druse militia leader and an American University graduate, condemned Arab countries that ''hunt down foreigners in Lebanon while providing protection to those on their territory.'' He did not give names.

The pro-Syrian newspaper Al-Sharq said in an editorial: ''The hunters of foreigners roaming the streets of Beirut must be stopped. The Lebanese people may soon find themselves without schools for their children if these splinter groups seeking to destroy the foundations of our civilization and culture are not checked.''

A senior Shiite Moslem cleric, Sheik Abdul-Amir Kabalan, assailed the ''murderous campaign of kidnappings'' as a violation of Islamic teaching. Kabalan, who heads the highest Shiite religious court in Beirut, has said before that tough measures are needed to bring law to west Beirut.