Egypt has seen a surge of militant action. Four "terror attacks" in the last 48 hours led supporters of Egyptian President Abdel Fattah El-Sisi to take to the streets in support of their government. Reuters/Amr Abdallah Dalsh

Egypt has had a tumultuous 48 hours: An explosion in a Cairo metro station injured 16 people; terror attacks in Sinai killed five; a bomb exploded at the Egyptian Embassy in Libya’s capital Tripoli, and 13 military servicemen are missing or wounded after militants attacked a navy ship. Egypt is in a “full-fledged war” against Islamist groups, military expert Ashraf Sweilam told Egyptian daily Al-Ahram Online.

"External forces" are waging that war “meant to break up Egypt and the Egyptians. ... Egypt is fighting a war of existence,” President Abdel Fattah El-Sisi said in a live TV address last month. That's a narrative he's been sticking to since he was elected last year, legitimizing his hold on power after a coup that ousted elected president Mohammad Morsi, who was backed by the Muslim Brotherhood.

Egypt has seen internal strife between the government and Muslim militants before, but despite the Brotherhood’s regional alliances, conflicts have largely remained within Egypt's borders. But now, over a year into Sisi's presidency and mere months before the country is set to hold parliamentary elections, Egypt is seeing a surge in unrest -- and that is playing into Sisi's narrative.

The president maintains that the country's hurting economy, a key factor that led to the 2011 revolution, can recover only if there is political stability -- and that he is the one to deliver that stability, with a crackdown on the Islamist opposition.

“While having attacks all around the country is certainly not good for the country as a whole, it does play to the narrative that there is a major terrorist threat,” said Zack Gold, a visiting fellow is at the Institute for National Security Studies. “In some ways it gives the government leeway to continue to act as it sees fit to counter terrorists.”

Sisi has used the terrorism narrative to enforce brutal crackdowns on the Muslim Brotherhood opposition, Gold said. The Egyptian government actually declared the group a terrorist organization earlier this year -- but Egypt is still facing an escalation of extremist activity. The Libyan civil war to the west and the allure of the Islamic State group have fueled Egypt’s own militant groups and made the country susceptible to spillover from the region's other conflicts.

Egypt’s biggest homegrown threat comes from the Sinai, home of jihadist group Ansar Bayt al-Maqdis. The militant group has been in nearly constant conflict with the military since Morsi’s removal in 2013, and claimed responsibility for one of Egypt’s deadliest days in the last year, when a double attack killed 31 people last month.

Though they’ve been capable of independently causing a significant increase in violence, several of Egypt’s groups have declared their support for the Islamic State group, also known as ISIS and ISIL, further embedding Egypt in regional unrest. Ansar announced its support for the Islamic State group Monday. Mujahedeen Shura Council in the Environs of Jerusalem, an extremist group with tentacles in both Sinai and Gaza, issued a statement last month urging all Muslims to back ISIS. After an ISIS spokesman issued a call to violence in Sinai, militant group Jund al-Khilafah in Egypt vowed to attack U.S. interests and “worshipers of the cross,” in its initial statement.

Outside the country, Sisi is facing one of his biggest foreign policy problems with the Libyan civil war. Fighting has been inching toward the Egyptian border, even crossing it at times. The U.S. accused Egypt of taking part in airstrikes not approved by Washington on Islamist militants in Libya this August, which Egypt denied. As fighting in Libya grew worse, Sisi’s involvement became more overt, culminating in his decision to train secular fighters aligned with former General Khalifa Haftar, who is waging a military campaign against extremist militants together with Libya's elected government. Sisi's decision may prompt further retaliation attacks akin to Thursday’s embassy bombing.

“Leaders of Egypt seem to think that they can create long-term stability through the use of force and through intimidation and arrest," Gold said. "In the short term that can work. In many ways the country as a whole is more secure.” But whether that approach can work in the long term in a country of 82 million at the center of the Middle East's conflicts remains to be seen.