Chad and Sudan have agreed to end hostilities against each other and normalise relations after reconciliation talks in the Qatari capital, Doha.
Officials from the two African nations signed the agreement on Sunday at the end of the talks that Qatar helped to mediate.
"The agreement stipulates the halting of hostilities, and everyone is now looking to the future, especially as both countries and people have big interests," Ahmad Abdullah al-Mahmud, Qatar's minister of state for foreign affairs, said on Sunday.
He said better relations between Sudan and Chad could make it easier to reach a solution to the conflict in Darfur in western Sudan.
"Both countries have a desire to solve the problem," al-Mahmud said.
Al Jazeera's Mohamed Vall, reporting from Khartoum, the Sudanese capital, on Monday, said the agreement "stresses the acceptance on both sides to adhere to a cessation of hostilities".
"It has not been a direct clash between the two armies, it has been a proxy war in which rebel groups from both sides are being used by these two countries," he said.
"But if they stop arming those groups and aiding and abetting those rebellions ... then that will be a good step ahead."
Both nations have long traded accusations that each is supporting rebel attacks inside the other's territory.
Vall said there is a general feeling of relief in Sudan in reaction to the agreement, even though people know many such agreements have been signed before.
"The agreement is a step towards a much [more] comprehensive agreement on the level of the presidents that is going to be signed in Libya next month," Vall said.
"The hope here is this will be a final one, and everybody will stick to the commitments that are going to be signed in this agreement."
Al-Tijani Saleh Fidail, Sudan's minister for international co-operation, said the two African countries were not at war, but had border troubles, the Qatar News Agency reported.
Past agreements collapsed because officials did not have a way of implementing them on the ground, he said.
Moussa Faki Mahmat, Chad's foreign affairs minister, said the only solution for the ongoing conflict is to find a mechanism to monitor the situation in both countries, the agency reported.
Qatar and Libya, which co-sponsored the talks, have been leading reconciliation efforts between Chad and Sudan since the two nations restored diplomatic ties in November.
A final deal is expected to be signed next month in Libya.