For years, Egypt watched as conflict in Libya threatened to spread instability to the border.
Now, General Khalifa Haftar – who led Libyan military forces in eastern Libya for years – is set to take the Libyan capital and unify much of the country. This could be a major success for Egypt, not only in securing its border and finding a partner to work with in Libya, but also for its regional role.
The 2011 Arab Spring toppled Libya's Muammar Gaddafi and Egypt's Hosni Mubarak. Libya sank into civil conflict, whereas Egypt remained relatively intact.
However, percolating violence in Sinai and a sense of growing unrest led the military to intervene on behalf of protesters in 2013, pushing out the Muslim Brotherhood's Mohammed Morsi.
Abdel Fatah al-Sisi – a former military commander – became president of Egypt and looks to cement his rule for the foreseeable future.
However, Egypt's regional role has been diminished in the last eight years as it seeks to shore up its economy and fight against terrorist threats at home. The battle in Sinai against an ISIS-backed insurgency, for instance, is a major challenge.
The Libyan border has also been a challenge, as the Egyptian air force regularly strikes at militant targets smuggling weapons and other things across the border. For instance, on September 28, 2017, the Egyptian air force struck 10 vehicles crossing the border.
For instance President Sisi and German Chancellor Angela Merkel discussed Libya and Sudan on Monday. Sudan's military pushed out long-time regime leader Omar Bashir last week. Now, Egypt could play a role in Sudan as well, at least in terms of discussing the matter with European powers. Egypt says it wants stability and security across the region. It is watching closely what happens in its southern and western neighbors.
On April 14, Haftar met with Sisi in Cairo. The goal of the meeting was to discuss developments in Libya where Haftar launched a surprise offensive near the capital earlier this month. His forces could eventually take the city. More and more, Haftar looks like the major leader of Libya, with the UN-backed government appearing weak and divided.
Egypt is widely seen as backing Haftar, along with Gulf countries such as the UAE, but officially Egypt says it is only working to support efforts to "combat terrorism and extremist groups."
What comes next in Libya is of great importance to Cairo. It wants both its neighbors to be more stable so that it can secure Egypt's borders.
This also represents a renewed role of Egypt's regional role. Once the most powerful state in the region, Egypt has reduced its role in discussing major conflicts, whether Syria or the Israel-Palestinian issue, largely working quietly on issues in the Middle East.
Egypt, for instance, does not seek a major role in the discussions about Iran's involvement in the region.
Where it does play a role, such as discussions with the Palestinian Authority and Hamas, it rarely does so with pomp and circumstance. However, that may be changing. With the defeat of ISIS and the winding down of the Syrian conflict, the role of Egypt may be increasing.
As it increases, it will work with Saudi Arabia, the UAE and Jordan on regional issues. Libya is a test for Egypt. Can it quietly, or even openly, play a role in solving the Libyan conflict? Will European powers and others listen to Egypt's views? Cairo will look to see if its phone calls and discussions result in changes in rhetoric or action regarding Libya and Sudan.
Seth Frantzman is The Jerusalem Post's op-ed editor, a Writing Fellow at the Middle East Forum, and a founder of the Middle East Center for Reporting and Analysis