France and Morocco will resume judicial cooperation, the French justice ministry said, ending a row sparked by a French probe into alleged torture by Moroccan intelligence services.
The resumption is important for France, which wants intelligence from Morocco and other North African countries on terrorism suspects, an interest that has become more urgent after this month's killings at the Charlie Hebdo magazine and a Jewish store in Paris.
Morocco hopes for the continued support of France, its former colonial ruler, in the Western Sahara territorial dispute.
"The heads of state King Mohammed VI and President Francois Hollande wanted to end this situation and preserve the exceptional partnership between the two countries," French Justice Minister Christiane Taubira said in a statement on Saturday.
Morocco had suspended cooperation agreements in protest at an attempt by French authorities to question Abdellatif Hammouchi, the head of Morocco's DGST domestic intelligence service, over torture allegations while he was visiting Paris a year ago.
The DGST has often been accused by Moroccan and international human rights organizations, including Amnesty International, of torturing activists and terrorism suspects, sometimes on behalf of the United States' CIA.
In March, France also had to apologize to Morocco after the kingdom's Foreign Minister Salaheddine Mezouar was searched while transiting at a Paris airport.
"Morocco wants respect from its partners, for its institutions and for its representatives," Mezouar told Reuters in a telephone interview on Saturday.
"We cannot allow anyone to tarnish the reputation and credibility of our representatives," he added.
He said he said he was happy with the win-win outcome and that the agreement should prevent misunderstandings in the future.
Mezouar said he would meet French Foreign Minister Laurent Fabius in coming days in Paris or Rabat to finalize the agreement.
Taubira said that following a meeting with her Moroccan counterpart Mustapha Ramid in Paris on Thursday and Friday, the two countries had agreed to amend the Franco-Moroccan judicial cooperation convention to boost the exchange of information between the two. They will also bring back liaison magistrates.