Sudanese President Omar al-Bashir has made a surprise visit to Chad, in a sign that relations between the two countries may be improving.
President Deby (r) has ruled Chad for 16 years
Mr Bashir attended the swearing-in ceremony of Chad's President Idriss Deby and the two men embraced warmly, to rapturous applause.
Mr Deby won a third term in May after changing the constitution.
Mr Deby cut ties with Sudan in April, saying it was backing rebels who attacked Chad's capital, N'Djamena.
Chad's opposition boycotted the May polls, accusing Mr Deby of trying to extend his rule illegally by amending the law.
The BBC's Stephanie Hancock in Chad says relations between Chad and Sudan have remained fractious for many months, with each country accusing the other of supporting rebels hostile to their respective governments.
In recent weeks the two countries appear to have been drawing closer together and just last month, the countries' foreign ministers signed a new peace deal.
Mr Bashir and Mr Deby had been due to hold talks at a rally in Dakar on Wednesday, where they were expected to resume diplomatic relations.
But now that Mr Bashir has set foot on Chadian soil - a move our correspondent says would have been unthinkable just a few months ago - there are very high hopes that hostilities between the two countries will end.
With the rebellion and the troublesome elections now finally behind him, President Deby will be hoping his third term in office is a little smoother, our correspondent says.