NAIROBI, KENYA -- With Libya's Moammar Gadhafi playing a role as provocateur, two of Africa's closest traditional allies, Kenya and Uganda, have turned against each other.

The two East African neighbors, each claiming to be blameless victims of the other's bad faith, are locked in a rancorous round of name-calling, border harassment and petty recrimination.

Uganda cut electricity to Kenya. Kenya cut phone service to Uganda. Uganda authorities intimidate Kenyan truckers as Kenyan custom officers harass Ugandan shoppers. Both countries have accused each other of marshaling troops along their common border and firing shells into each other's territory. Both countries have indignantly denied any such thing.

Western diplomats fear that Kenyan-Ugandan enmity could derail trade and transportation links between the two countries -- links that are vital to the economic health of all of East Africa. In addition, there is growing concern that, unless they can patch up their differences, the two longtime friends might try to undermine each other's governments.

Late this week, a high-level Ugandan delegation arrived in Nairobi for the first significant attempt this year to resolve the dispute. The Ugandans held two days of talks with Kenyan officials and both sides announced their intent to improve on relations that Ugandan Minister of State Balaki Kirya said had "deteriorated very much."

"What is worrisome is if they don't get past this squabbling, either country or both might start seriously supporting dissident groups across the border," said a senior diplomat here.

Besides the risk of regional instability, the Kenya-Uganda squabble has a symbolic resonance across sub-Saharan Africa. For it typifies an emerging schism in the continent's leadership.

Kenyan President Daniel arap Moi is of the old school. He entered politics during Africa's independence era and worked his way up through the ranks. At the age of about 62, he is a rigidly authoritarian and conservative leader whose government prides itself on its prowestern, anticommunist credentials.

Moi favors dark suits, large motorcades and never appears in public without his ivory mace. His unquestioned power complements his vast business interests. His style echoes that of Africa's most senior statesmen, President Felix Houphouet-Boigny of the Ivory Coast and President for Life H. Kamuzu Banda of Malawi.

Ugandan President Yoweri Museveni is of a new, less doctrinaire breed. He studied politics and economics at the University of Dar es Salaam in Tanzania and has long been an admirer of the insurgency techniques of Fidel Castro. Museveni, who is about 43 years old, is the first guerrilla leader to overthrow a sitting African government. His politics are unconventional; he rubs shoulders with Marxists from North Korea and free-market proselytizers from the World Bank.

He wears olive drab and high-top boots. He does not have extensive business holdings. His eclectic style echoes that of other revolutionary upstarts, Flight Lt. Jerry Rawlings of Ghana and Capt. Thomas Sankara of Burkina Faso.

In addition to the many obvious personal differences between Moi and Museveni, there is a foreign factor -- Libya's Col. Gadhafi -- that fires the current feud between Kenya and Uganda.

The Libyan leader supported Museveni with guns and money throughout the five years that he fought in the Ugandan bush. Since Museveni's National Resistance Army seized control of the government 18 months ago, Gadhafi has sweetened that friendship.

He agreed last year to a multimillion-dollar barter deal -- Libyan oil for Ugandan hides, corn and pineapples. According to western diplomats, Libya continues to supply guns and ammunition, along with two military aircraft and five military advisers, to Museveni's government as it fights against remnants of the military regime that it ousted.

Last September, in a display of Islamic rhetoric and military firepower, Gadhafi paid Museveni a state visit, arriving with a well-armed 1,500-man entourage in several large transports. During the visit, Gadhafi denounced Christianity as a "colonial religion."

The Gadhafi factor has not gone over well in Kenya, a predominately Christian country with a devoutly Christian president.

"Clearly, President Museveni and Col. Gadhafi have forged an unholy partnership to destabilize peace in Kenya," said one of several angry editorials in this week's Kenyan newspapers, all of which strive to reflect government thinking.

Growing Libyan involvement in Uganda comes at a particularly tense time in Kenya. The government here, which tolerates almost no internal criticism, has been engaged for the past year and a half in a harsh crackdown on local dissidents.

Kenyan officials have been quick to see links between dissidents and Museveni's Libyan connection. In recent weeks, Kenyan officials have accused Libya of using Uganda as a base to give military training to those dissidents.

There is no public evidence to support the claim and Uganda adamantly denies it.

Kenya recently closed the Libyan People's Bureau, or embassy, in Nairobi, expelled five Libyan diplomats and sentenced four Kenyan students to 10 years in prison for allegedly having been part of a Libyan spy ring.

From the Ugandan point of view, Kenya is overreacting. Museveni is seeking to convince western diplomats in the capital of Kampala that he has not sold his country's soul for Libyan guns and oil. This spring he rejected Libyan demands that he denounce American and French involvement in Chad, where the Libyans suffered an embarrassing defeat.

Like Rawlings in Ghana and Sankara in Burkina Faso, Museveni does not appear to be a traditional disciple of either the left or right. He pays official visits to Cuba and welcomes military advisers from North Korea.

But at the same time, according to a western diplomat in Kampala, Museveni has been eager to take economic advice from the World Bank and the U.S. government. Last month he sharply devalued Uganda's currency and approved an agreement with the International Monetary Fund.

U.S. assistance to Uganda has nearly tripled in response to Museveni's takeover, in part because it is seen as the brightest hope in recent years for the war-torn country.

According to a western diplomat in Kampala, Museveni "has made a firm intellectual commitment to rational, market-oriented policies."

Diplomats in Uganda and Kenya believe that generational and ideological differences between Moi and Museveni, along with the Gadhafi factor, are likely to continue to strain Kenya-Uganda relations.

The countries, however, are economically dependent on each other -- landlocked Uganda for a seaport, Kenya for a market for its goods. Both Moi and Museveni are viewed as economic pragmatists.

Ugandan and Kenyan officials meeting this week in Nairobi are believed to be trying to smooth over the personality rub between their leaders and to focus on the high price of continued squabbling.