Chad's President Idriss Déby says he remains in control following a rebel attack on the capital of the central African nation.

Buildings in the centre of N'Djamena came under artillery and machine gun fire early Thursday as government troops clashed with rebels, according to reports.

After three hours of fighting, Déby told local radio station French RFI: "The situation is under control."

There are still reports of pockets of fighting, but an unnamed diplomat told Reuters the situation had "calmed significantly."

Déby said the rebels, known as the United Force for Change, are mercenaries, hired by Sudan, to disrupt the May 3 presidential election and take control of the country, one of Africa's largest oil producers.

Sudan denies the charge and has, in turn, accused Chad of supporting rebels in Sudan's troubled Darfur region.

More than 1,200 French troops are patrolling the city and control the airport. Government troops used helicopters to fire on rebel positions.

France, Chad's former colonial master, opposes any forceful change in leadership in the country, but analysts say it is unlikely they will step in to defend President Déby.

Earlier this week, Chadian rebels occupied United Nations camps containing Darfur refugees, forcing UN staff to pull out.

The UN and American embassy were planning to pull all non-essential staff from the capital.

Exxon Mobil, which runs the major pipeline in the country, says it has already begun removing some of its employees.