By Patrick Markey

TIFARITI, Western Sahara (Reuters) - At a rocky outpost in Western Sahara, a new generation of soldiers who have never known war are mobilizing as tensions resurface in one of Africa's oldest disputes after a quarter century of uneasy peace.

Young Sahrawi troops man new desert posts for the Polisario Front, which for more than 40 years has sought independence for the vast desert region - first in a guerrilla war against Morocco and then politically since a ceasefire deal in 1991.

Now a standoff with Morocco, which controls the majority of Western Sahara, is renewing pressure for a diplomatic solution to ensure footsoldiers like Sidi Ahmed Brahim don't return to fighting as the last generation of commanders once did.

Aged 25, Brahim is as old as the ceasefire and his patience with United Nations efforts to end the decades-long impasse and prevent new desert clashes is wearing thin.

"All my life I've been waiting for the U.N. to find a solution," he said, sitting with a Kalashnikov rifle on his knee where his unit has set up. "Now Morocco is trying to test us."

The standoff since August has brought Moroccan and Polisario forces within 200 meters (yards) of each other in a narrow strip of land near the Mauritanian border.

With U.N. peacekeepers separating the troops there, this may not escalate into open conflict. But diplomats are struggling to entrench peace in the territory on the western edge of the Sahel, a region which is already scarred by conflicts as governments from Mauritania and Mali to Niger and Chad fight affiliates of al Qaeda, often with western backing.

Rich in phosphate, Western Sahara has been contested since 1975 when Spanish colonial powers left. Morocco claimed the territory and fought the 16-year war with Polisario which established its self-declared Sahrawi Arab Democratic Republic.

Like his younger comrades, Brahim has never fought but his father was killed in a last battle with Morocco, not far from where he is stationed close to the village of Tifariti.

"The younger generation wants to find a solution, whatever the cost," said Brahim, whose unit has set up anti-aircraft cannons and parked aging Russian tanks in the desert.

As he spoke, a United Nations observation helicopter made passes overhead, not far from where spotlights from a small U.N. peacekeeping base illuminate the desert at night.

STANDOFF AT THE BERM

Since the standoff, Polisario has mobilized troops near the Moroccan-built berm, a wall of earth and rocks protected by landmines. Zigzagging for almost 3,000 km (1,800 miles) through Western Sahara, it divides areas controlled by Morocco from those controlled by Polisario.

The latest trouble erupted at the berm's far southern tip. U.N. troops had to step in after Moroccan gendarmerie crossed the wall into a buffer zone and Polisario responded. Their units remain facing each other at the village of Guerguerat.

The standoff comes at a sensitive time for attempts to restart the diplomatic effort.

For Polisario, Guerguerat is a Moroccan provocation and the worst violation of the ceasefire it signed on the understanding that a U.N.-organized referendum on self-determination for Western Sahara would be held.

That vote has never happened, with neither side agreeing on the terms, including who should vote and whether the question of independence or just autonomy should be on the ballot paper.

Morocco says its operation was merely to clear wreckage and surface a road to Mauritania to help counter smuggling. In Rabat, officials deny any ceasefire violation, seeing only a Polisario attempt to score political points.

For their part, Polisario commanders say they have mobilized troops purely defensively near the berm.

So far, U.N. proposals that both sides withdraw have got nowhere, and frustrations are growing.

"We respect the ceasefire. Decisions are with the political leadership," Polisario security secretary Brahim Mohamed Mahmoud told Reuters. "But many Sahrawis feel after this and years of waiting the only solution is go back to war."

NEW DIPLOMATIC PUSH

Since late July, U.N. negotiators have tried to achieve a new round of negotiations. Polisario says it is ready to talk but the timing is complicated.

Polisario has a new leader, Brahim Ghali, following the death of its founder Mohammed Abdelaziz in July, while U.N. Secretary-General Ban Ki-moon will be replaced on Jan. 1 by Antonio Guterres.

On top of this, Morocco says the U.N. envoy to Western Sahara, Christopher Ross, cannot visit Rabat until a new government has been formed following elections in September and it has hosted a U.N. climate change conference this month.

In the meantime, Rabat is lobbying to rejoin the African Union, hoping to win support from the bloc for a plan put forward by King Mohammed which offers the region autonomy under Moroccan sovereignty. Rabat abandoned the AU three decades ago in protest when it recognized Polisario.

Much of the impasse reflects splits in the U.N. Security Council, which has been unable to force either side to accept proposals. France backs Morocco while the United States is more cautious but calls the king's plan "credible and realistic". Outside the five permanent members, Venezuela and Angola are more supportive of Polisario.

Mohamed Hadad, Polisario's U.N. coordinator, said the ball was with the Council. "The Security Council must consider there is a challenge to peace, they must give attention to this conflict," he said.

Rabat dismisses Polisario's insistence that the referendum be held, saying this plan is no longer specifically mentioned in U.N. resolutions. "Why do we need to go back to 1991?" said one Moroccan official source.

Western diplomats and a U.N. source said Morocco's move in Guerguerat appeared to be a flexing of muscles to test the new Polisario leadership while it plays for time diplomatically.

"They wanted to demonstrate to us all that they can move beyond the berm, which is a dangerous initiative to take," the U.N. source said. "In the absence of a negotiations process, we will see more and more of this."

Morocco rejects those accusations. "Polisario reacted, and violated the ceasefire by bringing in military," the Moroccan source said.  

CEASEFIRE "BETRAYAL"

Many Sahrawis have been displaced during the long conflict and live in refugee camps across the border in southern Algeria; more are in southern provinces of Morocco.

For many in the Algerian camps, where younger Sahrawis have lived all their lives, the Moroccan move at Guerguerat and what they believe was a slow U.N. response has only deepened their impatience and increased pressure for a solution.

The U.N. says around 90,000 refugees - a figure contested by Rabat - live in tents and ramshackle buildings spread across the desert plain near the Algerian town of Tindouf, where residents rely on aid agencies for water, food and other supplies.

Emotions ran high at a recent debate at the Rabouni camp, where two older leaders faced young activists. "The U.N. did nothing. Sixteen years of war got results; 25 years of ceasefire gave us nothing," said Hama El Mehdi, one of the activists.

For commanders who fought against the Moroccans in some of the last battles near Tifariti, the appeal of a political deal has faded. "I sent a message to commanders so I can get a rifle and go back to Guerguerat," said Mohammed Maloud Ahmed Bakifa, who lost an eye in the war and lives in a traditional Sahrawi tent near Tifariti. "The ceasefire was a betrayal, we are still not fully free."

(editing by David Stamp)