Two officials were killed and dozens injured as Moroccan security forces broke up a protest camp in Western Sahara, say reports.
The camp, for several thousand people near the territory's capital, Laayoune, was the biggest protest against Moroccan rule in the 35-year dispute.
Officials said the fighting later spread to the streets of Laayoune.
The violence comes hours before talks are scheduled to begin in the US on the future of the disputed territory.
A senior Moroccan security official said the two people killed were a police officer and a firefighter.
"They were stabbed to death by individuals in the camp," he told Reuters.
The official said it was the first time protesters in the Western Sahara had used knives against government security officers. About 70 people were also injured.
Local officials said the security operation was aimed at a group who had refused orders to leave the camp.
Laayoune government official Mohamed Ghalous said the authorities wanted to "end a situation which had exhausted all means of dialogue".Deadlocked talks
The violence then spread to Laayoune, said reports, with protesters throwing stones at police and setting fire to tyres.
One official told Reuters that several people had been arrested.
"The demonstration turned violent, forcing security forces to intervene," he said.
The unrest comes as negotiators from the Moroccan government are due to meet members of the Polisario independence movement at UN-mediated talks in the United States.
The former Spanish colony, which was annexed by Morocco in 1975, is the scene of Africa's longest-running territorial dispute.
Morocco annexed the phosphate-rich territory after Spanish settlers left in 1975. Rabat now offers to grant it autonomy, while Polisario seeks independence and is demanding a referendum.
Polisario fought a guerrilla war against Morocco until the UN brokered a ceasefire in 1991.
The talks between both sites have been deadlocked for years, and the last meeting in February 2010 ended without any movement in the dispute.