Nouakchott - The head of Mauritania's Supreme Court has refused to leave his post days after he was sacked by the president, a move the judge said was illegal and an attempt to undermine the powers of the judiciary.

The sacking comes amid a broader slow-burn movement challenging President Mohamed Ould Abdel Aziz, who was elected in 2009 after coming to power in a 2008 coup. He is now seen by Western nations as a key ally in tackling al Qaeda in the region.

Seyid Ould Ghaylani, who was due to remain president of the Supreme Court until 2015, was removed from his post and offered the position of Mauritania's new ambassador to Yemen in a decree published in state media last week. No reason was given for the shift.

However, Ould Ghaylani said his removal was illegal, accused the president of undermining the independence of the judiciary and was prevented by security forces from entering his office.

“I refuse this humiliation and personalisation of the judiciary,” Ould Ghaylani said on Sunday.

A presidential decree named Yahfdhou Ould Mohamed Youssef as the new head of the court. Mohamed Youssef was sworn in on Monday.

According to Mauritania's constitution, the head of the Supreme Court can only be replaced or suspended if he resigns, is physically unable to work or is deemed unfit to hold the post.

Hatem, an influential opposition party, called the sacking of the head of the court a “coup against the judiciary”.

“It is a serious attack on the constitutional independence of the judiciary and therefore justice, which is the basis for any democratic system,” said Brahim Ould Ebety, a prominent Mauritanian lawyer and human rights activist

Mauritania, which straddles black and Arab Africa on the West coast of the continent, has enjoyed several years of relative stability since coups in 2005 and 2008.

Abdel Aziz has won support from the likes of France and the United States for taking on al Qaeda's regional wing, AQIM.

But he has also faced months of regular protests over complaints ranging from the corruption and failure to organise legislative and local elections to his poor handling of a food crisis in the country. - Reuters