The Ben Ezra Synagogue in Cairo is located behind the Hanging Church and was once a church itself. The Ben Ezra Synagogue was originally a Christian church, which the Coptic Christians of Cairo had to sell to the Jews in 882 AD in order to pay the annual taxes imposed by the Muslim rulers of the time. The church was purchased by Abraham Ben Ezra, who came from Jerusalem during the reign of Ahmed Ibn Tulun, for 20,000 dinars. 

 

The synagogue was a place of pilgrimage for North African Jews and the site of major festival celebrations. The famous medieval rabbi Moses Maimonides worshipped at Ben Ezra synagogue when he lived in Cairo. 

 

Numerous restorations and renovations were made over the centuries, and the present building dates from 1892. It is a faithful reconstruction of the original, which had collapsed. During the reconstruction, a medieval Geniza (a hiding place for sacred books and worn-out Torah scrolls) was discovered, revealing thousands of original documents from the Middle Ages.