(CNN) -- The presidents of Sudan and Chad signed a non-aggression agreement late Thursday, aiming to halt cross-border hostilities between the two African nations.
Chad President Idriss Deby, right, and Sudan's President Omar al-Beshir, left, shake hands after signing the pact.
The signing came after nearly two full days of talks in Dakar, Senegal, between Sudan President Omar al-Beshir and Idriss Deby, the president of Chad.
Senegalese President Abdoulaye Wade facilitated the talks, and United Nations Secretary General Ban Ki-moon met with officials from both nations and witnessed the signing of the agreement at about 10 p.m.
"The idea is to get the governments of Sudan and Chad to normalize their relations with each other and to halt any action that would allow for the cross-border movement of rebel factions or armed factions of either side that could hurt the other country," said United Nations spokesman Farhan Haq.
Each country accuses the other of supporting armed rebel groups that cross the border to attempt to destabilize the government. The rival nations' armies have skirmished several times.
The United Nations says refugees and armed groups have been regularly crossing the border between the troubled Darfur region of Sudan and Chad. They allegedly include many of the rebels that attacked N'Djamena, the capital of Chad, in early February.
As recently as Thursday, just hours before the agreement was signed, Chad issued a communique saying rebels from Sudan had crossed the border.
Chad is still recovering from a failed attempt last month by rebels to overthrow Deby's regime.
The United Nations says the swelling number of Darfur refugees and other displaced people living in eastern Chad is causing serious strain on the region.
Kingsley Amaning, the U.N.'s humanitarian coordinator for Chad, said more than 10,000 people from Darfur, in Sudan, have fled into 12 official refugee camps in eastern Chad.
They join some 240,000 Darfurians who have lived in Chad since 2004 because of fighting in their homeland and an estimated 180,000 displaced Chadians also living there.
The number of displaced Chadians is growing because of the recent fighting there, Kingsley said.
Haq said the United Nations, which has peacekeeping troops in the Darfur region, will work to assure Sudan and Chad carry out the terms of Thursday's deal. The countries have signed several peace agreements in the past, only to see renewed violence flare up. E-mail to a friend