The presidents of Sudan and Chad have signed a peace deal aimed at ending cross-border rebel attacks between the neighboring countries.

The deal came only hours after Chad accused Sudan of backing a new rebel attack against its government. Sudan's deputy foreign minister, Al-Sammani al-Wassila dismissed the allegation as "nonsense."

The agreement commits both nations to implement past accords that have so far failed to end the violence in the region.

It was signed by Chadian President Idriss Deby and Sudanese President Omar al-Bashir Thursday in Senegal, on the sidelines of the Organization of the Islamic Conference summit.

The conference host, Senegalese President Abdoulaye Wade, had been trying to bring the two leaders together for more than 24 hours. Wednesday, the Sudanese president failed to turn up to sign the agreement, reportedly because he was tired and had a headache.

Chad accuses Sudan of supporting a rebel attack on the capital, N'Djamena, that nearly toppled his government last month.

Sudan, for its part, accuses Chad of backing rebel groups in the war-torn Darfur region, where conflict has raged since 2003.

The two countries have signed several peace accords in the past. But the pacts have done little to reduce tension and hostility between the central African neighbors.

Some information for this report was provided by AFP, AP and Reuters.