By that time, Goraj already had a Jewish community, with a stone synagogue, built probably in the late 17th century, and destroyed by the Germans in World War II. Following the Partitions of Poland, Goraj, which for centuries belonged to Lesser Poland’s Lublin Voivodeship, was annexed by the Habsburg Empire (1795), and in 1815 it became part of Russian-controlled Congress Poland. In the 19th century, almost all buildings were made of wood, except for the parish church and the synagogue. In 1855, the population was decimated by a cholera epidemic. During the January Uprising, Polish residents of the town supported the rebels, for which in 1869 Russian authorities stripped it of the town charter, and Goraj has remained a village ever since. Goraj was almost completely destroyed in World War I, and in the Second Polish Republic, it belonged to Lublin Voivodeship, as a poor village without prospects and industry. World War II brought further destruction, as Goraj was burned by the Germans twice – during the Zamosc Uprising (September 26, 1942), and in July 1944, during the Operation Tempest. As a result, there are few historic building in the village, with the exception of the parish church (1779–1782), its bell tower (1782), and two 18th century wooden houses. Rabbi Menachem Mendel Morgensztern, famed as the Kotsker Rebbe, was born in Goraj.