The Tunisian Army conducted mopping up operations today against a force of as many as 300 commangos that took over the southern city of Gafsa yesterday, according to telephone reports from the capital of Tunis.

All signs pointed to the operation having been mounted from neighboring Libya, despite elabrate efforts to implicate Algeria, Tunisia's other immediate neighbor.

The Tunisian government said about 20 persons were dead, but reports from Europeans in the city spoke of "many dozens."

The Tunisian ambassador in Paris said 75 to 90 prisoners were being interrogated and while many were Tunisians, a number had "accents from well to the south of us" -- a clear reference to Libya.

During interviews in Tunis last week, several Tunisians expressed concern about their countrymen receiving military training in Libyan camps. Libya says the Tunisians are volunteers to fight for recovery of Palestine from Israel.

According to the Tunisian news agency, the commandos entered from Algeria Saturday night and launched three simultaneous attacks on the Gafsa Army barracks, the gendarmerie headquarters and a police station at 2 a.m. Sunday. The attack force was said to be armed with advanced light weapons.

It took most of the day for the Tunisian Army to regain control of Gafsa, a mining center of 30,000 people 250 miles southeast of Tunis on the border of the southern desert.

Witnesses from the large community of French technicians in the town described the last holdouts as holed up last night in the local high school with women and children hostages. Tunisian Army tanks surrounded the school, the witnesses said.

Although the government said the Army was in complete control today. informed sources in Tunis said the soldiers were still hunting down escaped commandos. The area was sealed off and journalists who approached were turned away, the sources said.

Privately, Tunisian officials said the operation was a Libyan attempt to destabilize the government of President Habib Bourguiba, who is frequently ailing and generally considered to be several years older than the 76 that he admits to.

Libyan leader Muammar Qaddafi never misses an opportunity to recall the 1974 agreement he signed with Bourguiba to unite the two countries. It last 48 hours and Bourguiba has said he was tricked into it.

In an apparent attmept to ward off a Libyan threat, the moderate Tunisian government has been drawing closer to Algeria.

Algeria denied any connection with the weekend raid. "There is no doubt about the loyal and friendly behavior of Algeria, with which we enjoy warm relations," said the Tunisian ambassador in Paris.

Tunisia has turned away from Egypt and when the Arab Leauge pulled out of Cairo, it set up in Tunis with Algerian acquiescence.

There was speculation that the raid was designed to undermine the Tunisian-Algerian rapprochement. Even though all accounts agree that the raiders actually came from inside yalgeria, the general region involved straddles all three countries and contains desert that is hard to patrol.

On practically every anniversary of the Jan. 12, 1974, unification accord, there is a Libyan-inspired airplane hi-jacking. This year, a Rome-Tunis Alitalia flight was hijacked on Jan. 14 by a Tunisian who demanded that the plane land in Libya. The pilot persuaded him to let the plane land instead at Palermo, Sicily.

The Gafsa raid coincided with the anniversary of the Jan. 26, 1978, general strike that degenerated into rioting and shooting in which the Tunisian Army said it killed about 50 demonstrators. Independent observers agree that at least twice that number died. The government said the strike was Libyan-inspired.

The southern Tunisian region near Libya is poor, with heavy unemployment. Its ethnic and economic ties are more with Libya than with northern Tunisia. i

Thousands of young Tunisians cross the desert frontier in circumstances very like those of Mexicans attracted by the prosperity across the U.S. border.

There are about 80,000 Tunisian workers legally in Libya. Periodically, the Libyan goernment rounds up a few thousand illegal workers and ships them home. But some of them are allowed to escape deportation by volunteering for military training.

Tunisians are know to have been involved in all the recent Libyan military operations from Uganda to Lebanon. The bodies of 17 young Tunisians fighting to save the regime of Ugandan dictator Idi Amin were shipped home to Tunisia by the new authorities in Uganda.

Qaddafi has prevented Tunisia from exploiting offshore oil reserves in the Gulf of Gabes by contesting the claims. Smaller in area but more populous, Tunisia could get the economic lift from oil that it needs to deal with its social problems.

It is generally agreed that Tunisia could produce 400,000 barrels of crude oil a day from the offshore area. But no oil company will take the risk so long as the continental shelf has no been demarcated.

Qaddafi, who is cutting his own country's oil production because he does not need the revenues, has agreed to seek an advisory opinion from the World Court. But the dispute could easily be dragged out for a decade.