Sudan says it is ready for a full normalisation of relations with neighbouring Chad, raising hopes of an end to the conflict in Darfur.
Sudan's President Omar al-Bashir said a visit from Chad's President Idriss Deby had "put an end to all the problems" between the countries.
Mr Deby urged Chad's rebels, based in Sudan, to lay down their arms.
In the past Sudan and Chad have accused each other of sponsoring each other's rebel movements.
After two days of talks, neither side made firm commitments to expel the rebels using their country as a base to attack their neighbour.
There have been many agreements between Chad and Sudan in recent years.
The BBC correspondent James Copnall in Khartoum says these negotiations between the two presidents give some grounds for optimism, even if there is still much mistrust between the two sides.
President Bashir said: "Deby and I are here to confirm to the Sudanese-Chadian people that we have turned the page of our differences and disputes between the two states.
"From today, our common battle is the realisation of peace, security and stability for the affluence of the people of the two states."
He also announced a joint project to develop Sudan and Chad's common border.
Last month the countries also agreed to joint military patrols in the area either side of the border, and to remove the rebel troops they have influence over from near the frontier.
Ballots, not bullets
For his part, President Deby called on the Chadian rebels to lay down their arms, and guaranteed their safety if they returned to Chad from Sudan.
"I will give you security guarantees so you can return to your country and... rejoin civil society," Mr Deby said.
He invited Mr Bashir, who is wanted by the International Criminal Court for war crimes in Darfur, to visit Chad's capital, N'Djamena, soon.
He urged the armed Chadian opposition groups to take part in elections due this year. Chad will also hold a presidential vote in May 2011.
The US special envoy to Sudan, Scott Gration, told the BBC the commitment by the two presidents was a step in the right direction.
But he added that until the two governments moved to reduce the power of their proxy militias, little progress could be made.