But by the turn of the 21st century, Egypt's Jews had become a faded memory, their synagogues empty and their old neighborhoods offering scant testimony to a once-thriving community.
"There was a play, in the 1950s I think: 'Hassan, Morcos and Cohen'," said Magda Haroun, one of Egypt's few remaining Jews.
Hassan is a Muslim name, Morcos a common one among the large minority of Coptic Christians and Cohen is Jewish.
In 2008, a movie entitled only "Hassan and Morcos" was released, on the tragic follies of sectarianism.
"People must speak up so it doesn't just become 'Hassan'," Haroun, born in Alexandria in 1952, told AFP.
But the chances of running into a Cohen in Cairo or Alexandria are now no more than 200 in 84 million. That is what's left of a community that once numbered an estimated 80,000 souls.
When Egypt fought an unsuccessful war along with other Arab states to crush Israel after its founding in 1948, many Egyptian Jews were pressured to leave or expelled outright.
'Enemies of Islam'
The legacy of their community has been examined in an Egyptian-directed documentary called "Jews of Egypt", which brought a mélange of artists, activists and journalists to a screening at an upscale Cairo cinema last month.
The film, which seeks to unearth a facet of that history, starts with street interviews with passers-by on the topic of Jews.
"They are enemies of Islam," a man tells the camera.
Another says: "They were condemned by God."
The documentary flashes back to grainy old footage of a bygone age when the winsome Leila Mourad – a derivation of Mordechai – dominated the silver screen, and Jews were among the leaders of political parties.
The documentary was shot in Egypt and France, where a small community of exiled Egyptian Jews hangs on to its past, and director Amir Ramses said it is a case study in what he calls "the marginalization of the other."
Now conflated with the Israeli-Arab conflict, whose beginnings coincided with the Egyptian Jewish community's decline, the subject of Egypt's Jewish heritage has been all but suppressed in the country.
"Jews were mixed, whether intentionally or not, in the Arab-Israeli conflict. They were in the grinding mill," Ramses told AFP.
As Ramses found out, even bringing out a documentary on the subject would require a fight.
Its screening in several other cinemas was delayed pending the approval of a national security service, Ramses said.
When the service finally approved the documentary, Ramses said the culture ministry's censorship board asked him to introduce it with a disclaimer that it was a work of "fiction."
'We won't leave – this is our country'
In the documentary, Ramses interviewed Jews born in Egypt but forced to leave in the decade after the 1948 war. They spoke of peremptory expulsions and a rise of anti-Semitism coinciding with the Arab-Israeli conflict.
"It was moving," said one movie-goer after the show, painter Hani Hussein.
A pivotal event for Egyptian Jews was the 1954 Lavon Affair, named after then Israeli Defense Minister Pinhas Lavon, blamed for recruiting Egyptian Jews to bomb Western targets in the country in order to embarrass then president Gamal Abdel Nasser.
The plot was uncovered when a defective bomb in a conspirator's pocket gave out smoke and alerted police, who arrested him.
The final straw came two years later, when Britain, France and Israel attacked Egypt after Nasser nationalized the Suez Canal, in which British and French investors held major shares. Most of Egypt's Jews were forced to leave.
Magda Haroun recalls that her father, famed lawyer Shehata Haroun, volunteered to sign up with the Egyptian army, but when security officials showed up at their house they had come to arrest him.
Decades later, she says slurs against Jews have become commonplace, in classrooms and on the street.
"But we won't leave," she insists. "This is our country."