NAIROBI, Kenya — Government forces using helicopters and tanks repelled a rebel assault on the presidential palace in the central African nation of Chad on Sunday in a day of bloodshed that witnesses said left many civilians dead and wounded.

The assault marked the second day of fighting in what is the second attempted coup against President Idriss Deby in as many years.

U.S. officials relocated embassy operations in N'Djamena, the country's capital, to the city's airport, which was taken over earlier by French forces as a staging area for evacuating foreigners. Non-essential American personnel were told they could leave on French military aircraft, and by midday, the French had evacuated 400 foreigners.

In New York, the United Nations Security Council met in an extraordinary session at the request of France, Chad's former colonial ruler, and the three African members of the council, South Africa, Burkina Faso and Libya.

U.N. Secretary General Ban Ki-moon urged all countries in the region to respect one another's borders after Chadian officials accused Sudan of attacking the town of Adre on the Chad-Sudan border.

Chad has long accused Sudan of backing the rebels — a charge Khartoum denies. But analysts said Sudan, which has opposed international intervention in Darfur, would be a major beneficiary of a successful coup.

"If Deby is overthrown, you'll have a new alliance that will be to some degree beholden to Khartoum, which would now control the international community's window onto Darfur," said Reed Brody, a spokesman for Human Rights Watch. "It means there's going to be a potential restructuring of the humanitarian space along the border."

Chadian officials told European television newscasts that the rebels attempted to storm the palace, where Deby is believed to be staying, in pickup trucks armed with machine guns, but retreated after coming under heavy bombardment by military helicopters.

Witnesses said, however, that the rebel forces later resumed firing on the palace.

The aid agency Doctors Without Borders said that hundreds of people had been wounded, including many civilians hit by stray bullets, and officials from other groups said the fighting threatened to devastate the capital.

"If the president remains, I fear that the entire capital will be destroyed," said Levourne Passiri, country director for World Vision, a U.S.-based charity. "There is already much economic and human damage. Many people have been killed. Many civilians died yesterday."

Chad is an oil-rich but impoverished nation on the edge of the Sahara desert. Deby's regime is accused of stealing millions in oil money. But his support is also considered critical to the deployment of a European Union military force that would protect civilians, aid workers and 400,000 Darfur refugees living in camps in eastern Chad.

The European force is to be based at Adre, the border town that Chadian military officials said was attacked by Sudanese forces and allied militias. Chadian officials said they repelled the attacking forces, which were backed by Russian-made Antonov helicopters.

"We were attacked by the Sudanese army," the regional prefect, Chadian military Gen. Abadi Sair Fadoul, told Radio France International. "The army was able to fight back in the face of its enemies, and we routed them."

The fighting threatened to further destabilize what is already one of the poorest and most lawless patches of Africa.

"Sudan ... arms, finances and organizes these rebels. There is no doubt about that," Brahim Taha, the Chadian ambassador to France, told the France24 news channel. "If they continue to attack us, we will have to respond."

There were conflicting reports late Sunday of the fighting in N'Djamena. Taha said that government forces had driven rebels to the northern outskirts of the capital, while a rebel spokesman said his forces were merely regrouping.

France, the former colonial power in Chad, still maintains a major military presence there.