In September 2011, a huge throng of protesters massed at the embassy, and some broke into the building while Egyptian security forces stood by. Riot police officers later clashed with the angry crowd in a street battle, resulting in the deaths of at least two people. Egyptian commandos rescued six Israeli staff members who had been trapped in the building for 13 hours.

The warming in relations is partly predicated on cooperation on security. In the Sinai Peninsula, Egypt’s military is battling Islamic State-allied insurgents who have killed many Egyptian soldiers and police officers. Sinai-based militants have also fired into Israel, bombed a tourist bus and sabotaged a gas pipeline to Israel. Egypt is trying to sever smuggling tunnels from Sinai into the Gaza Strip, which is blockaded by Israel and controlled by Hamas, the Palestinian militant group.

But the reopening of an Israeli embassy also poses a delicate political question for Egypt’s government. Israel and Egypt have officially been at peace since the signing of a treaty in 1979, but opposition to Israel still runs deep in Egyptian society. For some, memories of past wars with Israel loom large, as do feelings of sympathy for Palestinians in lands under Israeli occupation or control.

An Egyptian Foreign Ministry spokesman, Ahmed Abu Zeid, declined to comment on the character of Egypt’s ties with Israel.

“The new thing today is just the official opening of a temporary location of the embassy at the residence of the ambassador, nothing much more than that,” he said. “I’m commenting only on the fact that this is the official opening today. Egypt has normal relations with Israel, and the ambassador has been working here over the last four years.”