After the first partition of Poland in the late 18th century Hrubieszów was annexed by the Austrian Empire. In 1800, Stanisław Staszic founded the Hrubieszów Agricultural Society, the first cooperative organization in Europe, which existed until 1945. The name of the town was changed in 1802 from Rubieszow to Hrubieszów. In 1809 the town became part of the Duchy of Warsaw, then in 1815 it became part of Russian-controlled Congress Poland, within the Lublin Governorate. In 1909, its population was 15,000. In 1918, it became part of the Second Polish Republic.