The hard-pressed government of the vast northwest African desert republic of Mauritania was overthrown early yesterday morning in an apparently bloodless military coup.

According to reports reaching here, Mustapha Ould Mohammed Salek, the chief of staff, deposed President Mokhtar Ould Daddah, 53, who brought his mineral-rich country to independence from France in 1960. He was arrested and taken to an undisclosed location. The coup reportedly was backed by four top military men described by observers who know Mauritania well as representing all the country's major regions except the north.

The north is the home of nomad tribes backing guerrillas of the Polisario Liberation Front who are fighting for the independence of nearby Western Sahara in a war that has impoverished Mauritania.

The coup seemed to be inextricably linked to Ould Daddah's conduct of the war. The Western Sahara, a former Spanish colony on the Atlantic coast, has been partitioned between Mauritania and its neighbor Morocco, Morocco's rival Algeria backs the guerrillas.

Under the pressure of the war, Mauritania has virtually become a satellite of Morocco, with 8,000 to 9,000 Moroccan troops stationed on Mauritanian soil.

From early reports it was unclear whether the coup favored Morocco or Algeria.

Moroccan Information Minister Mohammed Khattabi called the coup "very bad news," but there were strong hints that it may have been a pro-Moroccan move to prevent Ould Daddah's attempts to get out from under Moroccan influence by negotiating with Polisario.

The French national radio said it was "as if the military had heard of talks between Ould Daddah and the Saharans." The official communique announcing the coup spoke of "saving the nation from ruin and dismemberment."

It was also possible, however, that the coup many favor Algeria. If so, it could alter the balance of power in north Africa.

A Polisario spokesman in Algeria greeted the coup as "good news."

If the disputed Saharan territory were to become independent, it would provide an outlet on the Atlantic for Algeria. For the Libyans it would be a rallying point for the Sharan tribes that Libyan leader Muammar Qaddafi, whose ancestors came from Western Sshara, has expressed an ambition to lead.

"Morocco," said Information Minister Khattabi, "can never accept encirclement by Algeria through Mauritania."

Speaking early in the day, he said there would be "a great fisk of confrontation" if the new Mauritanian government tried to replace Moroccan troops there with Algerians.

But the new government seemed to provide assurance that there is no such danger when respect all its international commitments. It said it intended to tighten and improve its ties with "brother and friendly" countries.

Calling itself the Military Committee of National Rectification, the new junta took power in the capital of Nouakchott at about 6 a.m. local time.

Ould Daddah, was reported arrested by troops who kicked in the doors of his modest presidential palace on the outskirts of the city.

Starting at about 7:30 a.m., Mauritanian radio broadcast martial music and communiques announcing suspension of the constitution and dissolution of the government and the only legal party.

Ould Salek, the leader of the coup, was chief of staff in 1968 and 1969, when he was dropped in disgrace. He only resume his post early this year. His career is described as typical of the way in which Ould Daddah has humiliated and shown his mistrust and contempt for the warrior tribes who are the army's backbone.

Ould Daddah was the leading representative of the marabouts, the Islamic priestly caste the French turned into the country a ruling class by favoring its members with advanced education. A product of Koranic schools, France's school for sons of tribal chiefs in Senegal and the Paris Law School, Ould Daddah started his career as an interpreter in the French colonial administration. He is married to a French woman.

The Mauritanian armed forces have been tripled in sixe, to 17,000, in three years. The country of 1.3 million people covers a territory twice the size of France.

France, which is still Mauritania's main economic partner, has a military training mission there of fewer than 100 men. But the French air force has been flying reconnaissance and combat missions from Senegal, just to the south, against the Polisaric's columns inside Mauritania.

The French supply the key personnel for the nationalized iron mines at Zouerate and for the railway that takes the rich ore to the Atlantic coast 350 miles away.

The mines provide 85 percent of Mauritania's foreign earnings. The country's coffers are dempty not only because the guerrillas constantly cut the rail line but also because the Eu Laii bets on the complicated North African checkerboard. The Soviets, who had been backing seem to have been hedged recently. Polisario, recently made deals with Morocco to import phosphates and to fish in Moroccan territorial waters.

Moroccan sources say the Soviets reciprocated by in effect recognizing Morocco's sovereignty over its portion of the Western Sahara.

While pro-Western Morocco has been strengthening its economic ties with the Soviet Union, pro-Soviet Algeria has been intensifying its economic ties with the West in new liquefied gas agreements with various West European countries. Algeria's largest such contracts are with the United States.

Mauritania has seemed to be primarily a pawn in other people's games in northern Africa. In an interview during a visit to Paris in February, the dimunitive Ould Daddah, spoke guardedly and barely over a whisper in a huge reception room of the French state guest quarters in the Hotel Crillon.

"We are a poor people," he said. "Our words are lost in the winds of the deserts."