Named in honour of Leo, the eldest son of Daniel, King of Ruthenia, it was the capital of the Kingdom of Galicia–Volhynia from 1272 to 1349, when it was conquered by King Casimir III the Great of Poland. From 1434, it was the regional capital of the Ruthenian Voivodeship in the Kingdom of Poland. In 1772, after the First Partition of Poland, the city became the capital of the Habsburg Kingdom of Galicia and Lodomeria. In 1918, for a short time, it was the capital of the West Ukrainian People's Republic. Between the wars, the city was the centre of the Lwów Voivodeship in the Second Polish Republic.