Under the Ottomans, Safed was part of the vilayet of Sidon. After the expulsion of the Islamic rule and with it many jews from spain during the reconquista which ended by 1492, many prominent rabbis found their way to Safed, among them the kabbalists Isaac Luria (Arizal) and Moshe Kordovero; Joseph Caro, the author of the Shulchan Aruch and Shlomo Halevi Alkabetz, composer of the Sabbath hymn Lecha Dodi. The influx of Sephardi Jews made Safed a global center for Jewish learning and a regional center for trade throughout 15th and 16th centuries. In 1555, the Jewish population was 8,000-10,000. By the end of the century, it had grown to 20,000 or 30,000. An outbreak of plague decimated the population in 1742 and an earthquake in 1759 left the city in ruins. An influx of Russian Jews in 1776 and 1781, and of the Perushim in 1809 and 1810, reinvigorated the community.
In 1812, another plague killed 80% of the Jewish population, and in 1819 the remaining Jews were held for ransom by Abdullah Pasha, the governor of Acre. On January 1, 1837, an earthquake killed 4,000 Jewish inhabitants, mostly by burying them in their homes. In 1847, plague struck Safed again. Throughout the 19th century, the Jewish community suffered from Bedouin and Arab attacks. The Jewish population was increased in the last half of the 19th century by immigration from Iran, Morocco, and Algeria. Moses Montefiore visited Safed seven times and financed rebuilding of much of the town. Virtually all the antiquities of Safed were destroyed by earthquakes.
Twenty Jewish residents of Safed were murdered in the 1929 Safed massacre. In 1948, Safed was home to 12,000 Arabs. The city's 1,700 Jews were mostly religious and elderly. In the Israeli War of Independence, the Arabs fled en masse, among them the family of Palestinian Authority President Mahmoud Abbas.The city was conquered by Israeli forces on May 11, 1948.In 1974, 102 Israeli Jewish teenagers from Safed on a school trip were taken hostage by a Palestinian terrorist group Democratic Front for the Liberation of Palestine (DFLP) while sleeping in a school in Maalot and 21 of them were killed . In July 2006, Katyusha rockets fired by Hezbollah from Southern Lebanon hit Safed, killing one man and injuring others. On July 14, rockets killed a five-year-old boy and his grandmother. Many residents fled the town. On July 22, four people were injured in a rocket attack.
In the 1950s and 1960s, Safed was known as Israel's art capital. The artists colony established in Safed's Old City was a hub of creativity that drew leading artists from around the country, among them Yosl Bergner, Moshe Castel and Menachem Shemi. Some of Israel's leading art galleries were located there. In honor of the opening of the Glitzenstein Art Museum in 1953, the artist Mane Katz donated eight of his paintings to the city. During this period, Safed was home to the country's top nightclubs, hosting the debut performances of Naomi Shemer, Aris San, and other acclaimed singers.