NAIROBI, KENYA, DEC. 18 -- Kenyan President Daniel arap Moi, saying that Uganda was "preparing for war," ordered Uganda's ambassador today to leave Kenya within 24 hours, punctuating a week in which Kenya and Uganda have exchanged bullets, insults and allegations.

Moi's statement and the expulsion of the Ugandan ambassador, who was accused by the Kenyan government of uttering an "incredible insult on the person" of Moi, mark a new low in relations between two East African nations that have a long common border and close economic ties.

Late today Kenya recalled its ambassador and his deputy from Uganda.

Moi said Ugandan soldiers were digging trenches along the border and "preparing for war. We have not done it," he said in a speech at a Kenyan university, "so let the world know, when we act, they should not blame us."

The dispute has been fueled by Kenya's fears that Libyan leader Moammar Gadhafi is using his friendship with Uganda as a base for attempts to destabilize Moi's government.

In announcing the expulsion of the Ugandan ambassador, Kenya's minister of foreign affairs also said today that the Libyan embassy had been ordered closed.

The embassy "has been used consistently for gross interference in the internal affairs of Kenya," said Zachary Onyonka. The closing of the embassy came 15 days after Kenya expelled the Libyan charge d'affaires. Five other Libyan diplomats have been expelled since May.

Kenya repeatedly has accused Libya of operating spy rings inside this country. Without providing evidence, the Kenya Times, a government-owned newspaper, reported today in its lead story that two helicopters full of Libyan troops had landed this week at Uganda's Entebbe airport.

The expelled Ugandan ambassador termed the press reports "absolutely ridiculous." Similarly, he dismissed Kenyan charges that Uganda provides a base for Kenyan dissidents seeking to overthrow Moi's government.

"I am totally puzzled as to why the relationship {between Uganda and Kenya} has reached this unfortunate stage," said Ambassador Charles Katungi. "It is absurd for me to hear we are attacking Kenya, when ultimately we are the ones who will suffer."

Most of landlocked Uganda's imports and exports pass by road and rail through Kenya to the port city of Mombasa on the Indian Ocean. A prolonged closing of the Kenya-Uganda border would quickly bring Uganda's economy, long weakened by civil war, to its knees.

Uganda's President Yoweri Museveni asked the Organization of African Unity this week to mediate the dispute. OAU Secretary General Ide Oumarou sent messages today to both Moi and Museveni, appealing for a peaceful settlement.

"I cannot help deploring the tragic event that threatens peace and stability in the region," Oumarou said in a statement released at OAU headquarters in Addis Ababa, Ethiopia.

Six months of souring relations between Uganda and Kenya turned from bickering to shooting on Monday near the border town of Busia. Since then, five days of sporadic shooting between Kenyan police and Ugandan soldiers have resulted in a number of deaths and injuries.

Uganda's government newspaper, New Vision, said today that 15 Ugandans, three soldiers and 12 civilians, have been killed. Kenya said its security police killed at least 26 Ugandan soldiers. At least two Kenyan civilians have been wounded.

Exactly why the shooting broke out Monday and who started it remain unclear amid divergent claims by Nairobi and Kampala.

Kenya charged Monday that 100 Ugandan soldiers barged across the border and opened fire on Kenyan police. Museveni said this week that Kenya has massed troops on the border and that these troops started the shooting.

Busia has been abandoned by its residents, many of whom fled their homes this week carrying suitcases on their heads or pushing carts laden with household goods.

Part of the recent enmity between the two countries, who for years have shared communications and transport facilities, arises from personal and stylistic differences between their leaders.

Moi, who is about 62 years old, is a conservative, pro-western, anticommunist leader who tolerates no political opposition. According to western diplomats, Moi sees himself as a senior statesman in East Africa who should be listened to and respected by younger regional leaders.

Museveni, about 43 years old, is part of a new generation of African leaders and has done little, if anything, to demonstrate respect for Moi or his government.

Museveni's eclectic policies simultaneously embrace the free-market orthodoxy of the World Bank, the insurgency tactics of Cuban leader Fidel Castro and the radical Islamic politics of Gadhafi.