French soldiers are helping with the evacuation of French citizens

But Chad's ambassador to Ethiopia said the city had not fallen and President Idriss Deby was "fine" in his palace.

There are unconfirmed reports from Libya that rebels have agreed to a ceasefire brokered by Colonel Gaddafi.

On Saturday evening, France, which has 1,500 troops in Chad, began evacuating some foreign nationals.

The French foreign ministry has condemned the rebel attack, blaming "armed forces from outside".

Both the Chadian and Sudanese governments support rebels in each others' territory.

But a French military spokesman, Col Thierry Burkhard, told AP news agency it appeared that Mr Deby had succeeded in containing the rebels at his palace and was "even in the process of pushing them back".

Looting

There was heavy fighting throughout Saturday after thousands of rebels entered N'Djamena in the morning, after beginning their advance on the city from near Chad's eastern border with Sudan earlier this week .

Intense gunfire was heard in the city centre. A witness told the BBC that 30 army tanks were burning in the streets.

There were reports of outbreaks of looting, and of residents cheering on the rebel forces in some areas of the city.

President Deby sparked anger by changing the constitution

A bomb hit the residence of Saudi Arabia's ambassador to Chad, killing the wife and daughter of an embassy employee, the Saudi foreign ministry said.

But witnesses report that as night fell the fighting subsided, with just sporadic gunfire now being heard.

Gabriel Stauring, a US aid worker trapped inside a hotel in the centre of N'Djamena, told the BBC news website that he and the other guests were spending the night together in the hotel's dining room.

He said that some people had already been evacuated, but that he had been advised by the US embassy to remain in the hotel until morning.

He said that there had been a heavy attack on the building earlier in the afternoon, but that it has been relatively quiet since.

Ceasefire claim

The Libyan news agency said that rebel leader Mahamat Nouri had agreed to a ceasefire brokered by the Libyan leader, Colonel Muammar Gaddafi.

The African Union has charged Libya with overseeing the response to the rebellion in Chad, which was condemned at the end of the organisation's summit in Ethiopia.

CHAD TIMELINE June 2005 - Constitutional changes approved allowing president to stand for third term April 2006 - Hundreds killed as rebels fight government troops on outskirts of N'Djamena May 2006 - President Deby wins election boycotted by opposition January 2008 - EU approves peacekeeping force to protect Darfur refugees from violence in Chad

'Revolution's going on' Profile: Idriss Deby

The Union's new head, President Jakaya Kikwete of Tanzania, warned that if the rebellion succeeded, the country would be suspended from the AU until normality was restored.

The BBC's Stephanie Hancock, recently based in Chad, says insecurity has been the hallmark of Mr Deby's 17-year rule.

In 2005, he changed the constitution so that he could run for a third term in office, which sparked mass desertions from the army.

The situation was made worse by the accumulation of oil wealth by Mr Deby and his entourage.

Friction with Sudan

There is also tension with Sudan. Chadian officials say Khartoum is nervous about the deployment of EU troops in Chad and a joint AU/UN force in Sudan's western region of Darfur - both with the mandate of protecting civilians affected by fighting in Darfur.

France dominates the EU force bound for Chad, whose deployment has been delayed because of the fighting.

Some 100 troops Austrian and Irish troops had been due to arrive last Thursday.

THE REBEL COALITION Unified Military Command includes: Union of Forces for Democracy (UFDD) led by Mahamat Nouri Rally of Forces for Change (RFC) led by Timane Erdimi UFDD-Fundamental led by Abdelwahid Aboud Mackaye

'Living in fear in N'Djamena'

But late last year, one of the rebel groups, the UFDD, declared a "state of war" against French and other foreign forces because it said they were "bringing diplomatic, strategic and logistical aid" to the president.

Chad's Foreign Ministers Ahmat Allami has accused Sudan of instigating the rebel advance in order to stop the deployment of the EU force:

"Sudan does not want this force because it would shine a light on all the genocide that is taking place in Darfur orchestrated from Chadian territory," he told the BBC.