Before the dust had settled from a week of violence in this heretofore sleepy backwater, a small group of Gambia's rebels sneaked up to a suburban encampment of the victorious Senegalese Army in the twilight Friday and loosed a burst of automatic rifle fire.

The rebels immediately withdrew and the Senegalese, following a moment's hesitation, hotly pursued them. But when the troops pulled up to the edge of the low-income housing maze into which the rebels faded, none of the Gambians in plain view "had seen anything," recounted an incredulous Senegalese Army officer.

The day before, the Senegalese troops had ended a bloody, week-long domestic rebellion against Gambian President Dawda Jawara's government and freed about 160 hostages. Now, Gambians were refusing to help the Senegalese mop up the remnants of the rebellion that the neighbors had been called in to suppress.

In the nascent nationalisms of Africa, the Senegalese troops had already become alien occupiers and a source of resentment. While Gambia is only a small west African country, the lessons yet to be learned here may well apply elsewhere on the continent.

Africans have extracted similar lessons from Tanzania's invasion and two-year occupation of Uganda and the Libyan incursion into Chad.

Each of the three conflicts involve the military invasion by a stronger country of a weaker neighbor in support of one side in a domestic conflict. Such a role is anathema for the many fragile governments of post-independence Africa.

To date, however, the Senegalese intervention has not raised the uneasy African leaders' protests that followed the precedent-setting Tanzanian invasion of Uganda in 1979, which toppled dictator Idi Amin, nor the Libyan move last November into Chad's civil war.

Tanzania justified its invasion, which spearheaded a fractious coalition force of exiled Ugandans, as retaliation for an unprovoked attack on its territory by Amin's soldiers. Libyan strongman Muammar Qaddafi has explained his intervention in Chad -- which later developed into a Libyan-sponsored attempt to merge the two countries -- as a response to an invitation from the Chadian government recognized by the continent-wide Organization of African Unity.

In June, Tanzania withdrew the last of its 20,000 troops from the political chaos that rends Uganda. The new government there has the added burden of more than $500 million in war debts.

Qaddafi, for his part, had been searching for a country in which to use Libya's oil wealth and massive amounts of Soviet-made arms to extend his influence in northern Africa. After Qaddafi helped smash Chad's rebels, a unit of his own Army was attacked by a local detachment of forces loyal to the president, who had requested Libyan assistance.

While the Gambian rebels' attack Friday on the Senegalese soldiers' encampment six miles west of Banjul was militarily insignificant, it did highlight the vulnerability of the government here. An unknown but apparently large number of Gambia's 900 police were active participants in the rebellion.

Like Uganda, Gambia will have to rely on foreign troops to maintain order until the government can rebuild a loyal domestic force. Today, President Jawara is surrounded by Senegalese bodyguards.

Since the invasion, a number of African leaders have declared support of the Senegalese action, which the presidents of Senegal and Gambia both said was in conformity with a 16-year-old mutual defense treaty.

One of the first messages of support to reach Senegalese President Abdou Diouf came from Tanzanian President Julius Nyerere, who had denounced the OAU for not condemning Amin's attack on Tanzania. Diouf was also publicly supported by this year's OAU chairman, Kenyan President Daniel arap Moi, and by Sierra Leone's President Siaka Stevens.

Guinea-Bissau's strongman, Joao Bernardo Vieira, to whom the rebels initially appealed for help, flew to Dakar to express his support of Diouf in person.

With only several thousand troops engaged in the week-long fighting, the bill for Diouf's crucial support is likely to to be far less than Nyerere charged Uganda -- assuming the Senegalese leave soon. But Gambia, like Uganda, is strapped financially and will have trouble paying.

And the Senegalese soldiers, like Qaddafi's in Chad, may find themselves at odds with the people they came to save. The Gambians' prerebellion concern about the larger Senegal's intentions in their territory has just begun to resurface.

Just these points initiated some heated exchanges between the 57-year-old Gambian president and African reporters at an hour-long press conference at the end of the fighting. The presence of Senegalese troops may have an adverse impact on Jawara's reelection chances in elections scheduled for March.

Jawara probably heightened existing fears for some Gambians when he announced that Gambia's and Senegal's security services would be "integrated," a unique arrangement for highly nationalistic modern-day Africa.

The rebellion, which both Diouf and Jawara claimed was sponsored by unnamed foreign sources, "has demonstrated that the security interests of the two countries are inextricably" linked, Jawara said.

The neighboring states have a mixed record of attempts at economic and political cooperation. Jawara said the integrated security arrangment "involves some loss of sovereignty."

Was he being "forced" to move faster toward political and economic integration of Gambia and Senegal than he had been prepared to before the rebellion? "I don't think so," he replied.

Did he then envision "a permanent Senegalese presence" in the country? "I haven't envisioned anything," he snapped.

A Nigerian television reporter said the Senegalese ambassador in Lagos had talked of a "confederation" of the two nations. "Well," laughed Jawara, "when you go back to Lagos you'd better ask him about it."

Jawara, who has led Gambia since 1962, was asked if he would call elections earlier than March to see if he still had the country's confidence. "I don't think this is necessary," said Jawara.