Cairo - Egyptian President Abdel-Fattah el-Sisi says his country will work with Sudan to support Libya's military against Islamic militants.
El-Sisi's remarks on Sunday 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-Sisi 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.
Al-Bashir has an international arrest warrant against him for war crimes in Sudan's restive western Darfur region.