Egyptian President Abdel-Fattah el-Sissi said Sunday his country will work with Sudan to support Libya's military against Islamic militants in a bid to restore stability to the two countries' war-torn neighbor.
El-Sissi's remarks came at the end of a two-day visit by Sudan's President Omar al-Bashir.
The chaos in Libya is a top foreign policy concern for Egypt, which has seen cross-border attacks by Islamic militants. Libya's new government has accused Sudan of arming "terrorist groups" in Libya, a charge Khartoum denies.
El-Sissi said Sudan and Egypt agreed to coordinate efforts to achieve stability in Libya through supporting state institutions, primarily the military. Al-Bashir said his country "sees eye to eye" with Egypt on bilateral and regional issues. The two leaders said they want to move past recent strains in relations over divergent views over shared water resources and borders.
A dam constructed by Ethiopia threatens to reduce Egypt's share of the Nile, challenging a colonial-era agreement that has given most of the water to Egypt and Sudan. Sudan is not against the dam, while Egypt has been lobbying to reduce the impact of the project on its share of the river.
Egypt and Sudan have a border dispute that also dates back to colonial times. Ahead of his visit, al-Bashir raised the issue of the "Halayeb Triangle" along the Egypt-Sudan border with reporters, saying his country won't go to war over it but seeks to resolve the dispute.
"I assert now, after this second meeting with my brother president el-Sissi, there is a strong political will for the bilateral relations to move forward," al-Bashir said Sunday.
This is his first visit to Egypt since el-Sissi came to office in June, following the ouster of Islamist President Mohammed Morsi in July 2013 amid popular protests demanding his resignation. Morsi was an ally of al-Bashir and his Islamist party.
Al-Bashir has an international arrest warrant against him for war crimes in Sudan's restive western Darfur region.