Egypt has been getting itself in the news a lot lately and mainly for the wrong reasons. This week it was because former president Mohamed Morsi, whom current President Abdel Fattah el-Sisi toppled in a July 2013 coup, died suddenly in the dock during one of his interminable court appearances on a range of dubious charges.
The cause of death wasn't immediately clear but Human Rights Watch blamed the government for denying the 67-year-old Muslim Brotherhood leader proper healthcare during his almost six years in prison. Cairo firmly denied this.
Egypt has also begun cropping up again as a player in regional conflicts, like Sudan and Libya. Emily Hawthorne of Stratfor observes that Cairo's 'willingness to involve itself in regional affairs ... waxes and wanes according to how stable it is at home. Today, after years of political chaos since the Arab Spring and the return of the military to power, Egypt's internal politics have stabilised'.
That may only have been achieved by the repression of the likes of Morsi and the Muslim Brotherhood. And in any case such stability is not complete because real threats from violent extremists persist in the Sinai. Nevertheless Cairo now apparently feels strong enough to resume its traditionally active regional role.
El-Sisi has been keeping company with the assertive Saudi Arabia and UAE in their African adventures
And as it does so, Egypt has been cited - along with Gulf states Saudi Arabia and the United Arab Emirates (UAE) in particular, but also Russia and to a lesser degree France - for providing military support to maverick Libyan General Khalifa Haftar in his campaign to conquer Tripoli, capital of the United Nations-backed government.
Egypt, again principally in the company of the same Gulf states, has been backing the embattled Transitional Military Council in Khartoum. The council is resisting a tide of popular internal pressure and growing external pressure to transfer power to a civilian transitional authority after it helped oust Omar al-Bashir on 11 April and then stayed put.
What is Egypt's game plan? Is this just a military strongmen's mutual support group? Is it about a visceral aversion to anything that smacks of Islamic fundamentalism or just Islamism wherever it occurs in the region? Or is something else at play?
Some of it is no doubt about el-Sisi taking a greater genuine interest in Africa than his deposed predecessor Hosni Mubarak. But el-Sisi has also been keeping company recently with the likes of the assertive Saudi Arabia and UAE in their African adventures, suggesting a broader strategy.
A Western intelligence analyst who requested anonymity, cautions against putting Cairo entirely in the same box as the UAE and Saudi Arabia, even if their interests coincide in places. He says el-Sisi is mainly supporting Sudan's Transitional Military Council and Libya's Haftar to protect Egypt's borders from Islamic terrorists operating from these neighbouring countries.
Globally Egypt has annoyed the UN and international community by supporting General Haftar in Libya
He notes that last year Haftar captured Hisham al-Ashmawy, one of Egypt's most wanted enemies, in Libya and last month handed him over to Cairo. Other terrorists are still operating on the Libyan-Egyptian border. And from Sudan, jihadist groups like Liwa al-Thawra, which Egypt claims is linked to the Muslim Brotherhood, are also attacking into Egypt, he says.
By contrast Saudi Arabia and the UAE are involved in Libya and Sudan because they are playing a wider role in fighting Islamic terrorism - at least as they characterise it - along with regional rivals like Iran and Turkey right across the Middle East, the analyst said.
So for example, members of Sudan's notorious Rapid Support Forces - formerly the feared Janjaweed Arab militias who terrorised the people of Darfur and brutally dispersed protesters in Khartoum on 3 June - have been helping Saudi Arabia and the UAE fight the Iran-backed Houthi Shi'a militias in Yemen. The Gulf states probably fear that a civilian government in Khartoum would pursue a far less aggressive foreign policy.
El-Sisi may have another motive for backing the military junta in Sudan, and that is that Ethiopian Prime Minister Abiy Ahmed is mediating in the conflict between the generals and the civilian protesters. Ethiopia is Egypt's traditional rival in the region. This rivalry has intensified since Ethiopia began building the Grand Ethiopian Renaissance Dam on the upper Nile which Cairo fears will staunch its vital water source.
However Abiy is at least informally representing the African Union (AU) - as well as more formally the regional Intergovernmental Authority on Development - in his Sudan mediation. And the AU Peace and Security Council (PSC) has come down clearly on the side of the civilian protesters, suspending Sudan from the AU and threatening further sanctions if the Transitional Military Council doesn't cede power to a transitional civilian authority by 30 June.
El-Sisi has exploited his occupation of the AU chair to dilute the PSC's strongly anti-military stance
El-Sisi has been exploiting his current occupation of the AU chair to dilute the PSC's strongly anti-military stance. Egypt supported the Transitional Military Council from day one by helping to prevent Sudan's suspension during the PSC's first meeting on the subject. El-Sisi can be expected to continue this effort, although the brutal crackdown by the Sudanese military on peaceful protesters on 3 June has complicated his task.
The AU PSC has previously got out ahead of AU leaders as a whole on continental conflicts notably in Burundi in 2015 when it went as far as calling for AU military intervention. So it wouldn't be unprecedented for the AU heads to take a more tepid approach on Sudan too.
Globally Egypt has also annoyed the United Nations (UN) and the international community by supporting Haftar, though US President Donald Trump has expressed unreserved support for el-Sisi - as for Haftar - because of their strong anti-jihadist stances. The Russian and French support for Haftar may provide further stoppers against any action by the UN Security Council.
Egypt has the big global players on its side, and has a critical geopolitical position astride the Suez Canal, Red Sea and Nile and alongside the Mediterranean. Together with its potent military and financial backing from Saudi Arabia and the UAE, el-Sisi probably feels he has enough bargaining chips to counter any opposition to his more assertive positions in the region. And indeed Egypt's more repressive politics at home. The two seem, depressingly, to go together.
Peter Fabricius, ISS Consultant