By the 19th-century, the Galilean city of Safed comprised a major Jewish center. It had become a kabbalistic centre during the 16th-century, reaching a size of about 15,000 at its peak. Despite the decline through the 17th and 18th centuries, by the 1830s there were still around 3,500-4,000 Jews living there, comprising at least half the population. The Jews of Safed had been subjected to a prolonged attack in 1834 during the Peasants' Revolt: Over 5,000 Arab peasant rebels had launched a revolt protesting against legislation imposed by the new Egyptian ruler Muhammad Ali and some had used the uprising as an opportunity to attack the Jews. After several months, the Egyptians managed to crush the rebellion and regain control of the county and the Jews of Safed began to rehabilitate themselves. Not long after, Safed was again the scene of devastation when in 1837 a strong earthquake resulted in thousands of deaths and the destruction of many buildings. The northern, Jewish section of the town was almost entirely destroyed. By 1838, the tense relationship between the "fellahin" and the Egyptian overlords was again mounting and a full-scale Druze revolt erupted in January. In summer of 1838, the Druze captured a heavily outnumbered Egyptian garrison outside Safed.