Morocco's ambassador to Algiers is to resume work on Monday, after having been recalled in a spat over disputed Western Sahara, a senior Moroccan official said.
"The ambassador has arrived in Algeria and he will resume his duties tomorrow (Monday)," the official told AFP on Sunday, asking not to be named.
He stressed the envoy had only been recalled for consultations and not withdrawn, adding that Morocco "will always take measures against those who try to touch its territorial integrity."
On an incident last week in which a Moroccan protester tore down the flag from Algeria's consulate in Casablanca, he said the authorities had been "firm" and the perpetrator was under arrest
But the official denied that Morocco had made an "apology" over the incident.
The Algerian news agency APS said the ambassador, Abdallah Belkaziz, was summoned to the foreign ministry on his return and had expressed his government's "regrets" over the flag incident.
Signup to our newsletter and follow us on Facebook and Twitter!
The Algerian authorities want a role in an investigation into "this particularly serious incident," the ambassador was told, according to APS.
Friday's incident in Morocco's economic capital sparked an angry protest from Algiers.
Dozens of people had gathered outside the consulate in Morocco's economic capital to protest over comments by Algerian President Abdelaziz Bouteflika on Western Sahara.
In a speech read out in Bouteflika's name at a meeting in Abuja, he said an international mechanism to monitor human rights in Western Sahara was needed "more than ever."
Bouteflika referred to "massive and systematic human rights violations that take place inside the occupied territories to suppress the peaceful struggle" of the Sahrawi people.
The row is the latest between the North African neighbours, whose decades-old rivalry centres on Western Sahara, annexed by Morocco in 1975 in a move not recognised by the international community.
Rabat has proposed broad autonomy for the phosphate-rich territory, but the idea has been rejected by the pro-independence Polisario Front, which is based in Algeria.