The deposed president of Mauritania was set free Sunday after 4 1/2 months under house arrest and immediately began working to retake power from the junta that overthrew him, a spokesman said.

Sidi Ould Cheikh Abdallahi was meeting in his home village with staff and supporters and plans to "fight for his legitimate power to be restored," said Kaber Ould Hamoudi, the president's chief of staff.

France welcomed Abdallahi's release and called for the junta that rules his northwest African nation to step down.

"The solution to the current crisis depends on restoring constitutional rule," France said on behalf of the European Union, whose rotating presidency it holds.

The United States and France, the country's former colonial ruler, canceled aid to Africa's newest oil producer after Aballahi was overthrown by a military coup. The junta had announced under international pressure that they planned to release Abdallahi by Dec. 24.

"I will make use of my freedom within the limits that will be set by the putsch leaders. I am firmly determined to fight for this coup d'etat to fail," Abdallahi told the French newspaper Le Monde in an interview before his release.

UN Secretary-General Ban Ki-moon welcomed Abdallahi's release, but said in a statement that he repeats his "call for the prompt restoration of constitutional order in Mauritania."

The junta now appears to be allowing Abdallahi to move freely inside Mauritania but it is unclear if it will allow him to travel overseas to events such as meetings of African heads of state.

"The president plans to behave like the legitimate president of Mauritania but without question he will be prevented from exercising his authority by the usurpers of power," Hamoudi said in a telephone interview from Abdallahi's house in the village of Lemden.

"He will not be free until he is allowed to resume his constitutional duties as the president of our country," Hamoudi said.

The chief of staff said he expects Abdallahi to return to the capital within days.

"It will be a peaceful fight, a diplomatic fight — one both inside and outside the country," Hamoudi said.

Hamoudi said soldiers woke Abdallahi's family shortly after 3 a.m., banging on the door of his home in Lemden, where the military had placed him under 24-hour surveillance.

The security forces demanded his staff wake the 70-year-old president, who was not told where he was going and was not allowed to be accompanied by his family. They took him to his home in the capital, Nouakchott — 150 miles and a three-hour drive away — and dropped him off, telling him he had been set free, said Hamoudi.

The president's release appeared orchestrated to draw as little attention as possible and prevent supporters from flocking to his side as he returned to the capital.

Abdallahi refused to stay at his house in Nouakchott and immediately made arrangements to be driven back to Lemden.

There are no security forces inside his home there, according to Hamoudi, but a handful of soldiers are still posted in the village.

Mauritania has had numerous coups since independence from France in 1960. It appeared the country had turned a corner last year when a different military junta organized elections deemed free and fair. But less than 1 1/2 years after taking office, Abdallahi had a falling out with the country's top generals, firing several of them.

Hours later, the same generals announced a coup, taking Abdallahi into custody and imprisoning his wife and children in the presidential palace.