The fort left behind by the departing Spanish is straight out of Beau Geste." The camel's-hair tents and the camels are the real McCoy.

The only unmistakably modern touches are the cannibalized skeletons of more than a dozen Land Rovers, jeeps and army trucks.

Stretching in front of the fort as far a sthe eye see - which is not that far, because of blowing sand and the shimmering effect of the 100-degree heat - is what Mauritanian troops call the "BILLARD TABLE,"

It is a flat expanse of hard sand that now serves as a landing strip for the occasional visits of the half-dozen or so propeller planes that make up the Mauritanian air force.

The Mauritanians attacked across that sand flat in February 1976 and dislodged their advesaries, the Algerian-backed guerrilla nomads of the Polisario Front, from the heights surrounding the Hassi Answert oasis.

The pitched battle was a rare engagement in this desert war.

"If we can pin them down," said a turbaned sergeant, 25-year veteran of the French Camel Corps and the Mauritanian army, "we can make mincemeat of them."

But as he and his comrades talked it became clear that finding the guerrillas and pinning them down is not easy. The Polisario has continued to make propaganda points, if little military headway, from its hit-and-run raids.

Mauritanian soldiers clearly expect the war against this elusive enemy to be a long one, and despite misgivings, Mauritania has accepted the help of a battalion of Moroccan troops in the Mauritanian area or the former Spanish Sahara.

The guerrillas moved into the Sahara as Spanish troops pulled back to two Atlantic ports following the November 1975 Madrid agreement on disposition of the colony: two-thirds to Morocco, one-third to Mauritania, nothing to Algeria.

At the time of the attack across the "billiard table," the guerrillas were ensconced on the peaks of the Black Rock mountains that rise out of no where around the fort.

The guerrillas were heavily armed and had mined the passes. They never expected the Mauritanians to roll across the "billiard table."

For once, the element of surprise was not with the guerrillas. The fighting lasted from late one afternoon until just before noon the next day, when the guerrillas were driven out.

For the most part, the Polisario Front has avoided such direct conflicts, and has based its strategy on the hit-run strike.

Mauritanian President Moktar Ould Daddah finally decided that things had gotten out of hand after two raids this spring against Zourate, the iron-mining center that provides 70 to 80 per cent of the country's foreign exchange.

Under a Moroccan-Mauritanian joint defense treaty dating from the first raid on Zouerate in May, the president agreed to have a battalion of Moroccan troops stationed in the Mauritanian part of the Sahara.

However necessary, the Moroccans are scarcely welcome to Mauritanians who remenber that Morocco dropped its claims to their country only in 1969.

"What does that make us look like in the eyes of the world?" the fort's commander, a captain, asked angrily.

For reasons perhaps as much psychological as military, the Mauritanian officers assigned here want a radical change of tactics that would involve stationing Mauritanian troops inside the Moroccan zone of the former colony.

A lieutenant said: "The Moroccans are a Westernized army. They're heavy, slow-moving and fine for fixed defense such as protecting Zouerate. We're an anti-guerrilla army, fast in pursuit and we know the terrain as well as the Polisario. In the desert where it's often more than 110 degrees we don't lose our morale, and that's what counts here."

The Mauritanians admit that expansion of their army from 2,000 men to more than 15,000 men in little more than a year has been accompanied by leadership problems.

An officer candidate school run by about 15 French officers turned out 60 second lieutenants and 60 non-commissioned officers this spring.

The Mauritanian buildup has permitted bigger garrisons and has caused the Polisario Front to increase the size of its raiding parties.

From their original five to eight Land Rovers, the guerrilla groups are now up to as many as 80 - including those assigned to pick up the dead and wounded and return them as much as 800 miles to Algeria.

The bigger the raiding party, the easier it is for the Mauritanians to intercept it. But much of the time the Mauritanian army is involved in 10-day patrols ranging over 500 miles searching for the elusive guerrillas. The moving sands cover and uncover the Land Rover tracks. The guerrillas travel mostly at night and during the day their vehicles are hidden under tents that are indistinguishable from those of peaceable nomads.

Polisario and Mauritanian patrols are known to have passed within a few hundred yards of each other without knowing it.

"The problem is that all Sahara people know the desert," a lieutenant said, "and there are just too many hills and dunes to hide in. It's a big place the Sahara."