Secretary-General Ban Ki-moon is deeply disappointed and angry at the huge demonstration in Morocco against him over his remarks about the contested territory of Western Sahara — and astonished at the government's reaction, the United Nations said Monday.

U.N. spokesman Stephane Dujarric said the U.N. chief told Morocco's Foreign Minister Salaheddine Mezouar during a meeting here that "such attacks are disrespectful to him and to the United Nations."

Morocco annexed Western Sahara, a former Spanish colony, in 1975 and fought a local independence movement called the Polisario Front. The U.N. brokered a ceasefire in 1991, pending a referendum over the territory's fate that has never taken place primarily because of disputes over voter lists.

Morocco considers the vast mineral-rich Western Sahara as its "southern provinces" and has proposed wide-ranging autonomy for the region, but the Polisario Front insists on self-determination through a referendum for the local population.

The dispute arose over Ban's use of the term "occupation" in describing the territorial status of the Western Sahara during his first visit to refugee camps in Algeria for the Sahrawis, as the region's native inhabitants are known.

Dujarric said the secretary-general "took note of the misunderstanding related to his use of the word 'occupation' as his personal reaction to the deplorable humanitarian conditions in which the Sahrawi refugees have lived in for far too long."

Morocco accused Ban of "abandoning neutrality, objectivity and impartiality," of giving in "to the blackmail" and "spurious claims" of the Polisario Front and of insulting the government and its people.

Up to 1 million Moroccans marched through their capital Rabat on Sunday, encouraged by leading political parties, to protest Ban's remarks. Some chanted, "The Sahara is ours." The government said more than 3 million people participated in the march "to denounce the verbal slippage of the secretary-general."

Dujarric said Ban requested "a clarification" from the foreign minister regarding the reported presence of several members of the government among the demonstrators.

"The secretary-general asked the foreign minister to ensure that the United Nations enjoys respect in Morocco," he said.

Dujarric said that "in choosing to misrepresent the purpose and progression of the secretary-general's trip to the region, the demonstrators, and their sponsors, deliberately chose to ignore that at every stop on his trip he underlined his personal commitment to encouraging genuine negotiations between the parties" to achieve what the U.N. Security Council has repeatedly requested — "a just, lasting and mutually acceptable political solution, which will provide for the self-determination of the people of Western Sahara."

He said Ban reiterated to Mezouar his call in November 2015 "for genuine and serious negotiations without preconditions to make progress soonest."