The synagogue remained intact until the 1980s, when it was destroyed under the orders of Muammar Gaddafi and replaced with an apartment complex.
During the Ottoman rule, the building was expanded and became a place of pilgrimage and study of the Zohar. The synagogue was burned in 1868 by disgruntled Muslims of his growing fame and rebuilt in 1870 by the Pasha of Tripoli by order of the Ottoman sultan. Another fire, this time accidentally, destroyed the synagogue in 1912, when Tripoli has recently been under Italian rule. It was rebuilt shortly afterwards. A synagogue in Benghazi was built on the same model.
After the mass exodus of Jews from Libya between 1949 and 1951, Libyan migrants in Israel built a replica of the synagogue in Zeitan, a city they founded near Lod.