At the first census after the Liberation of Bulgaria in 1880 with 24,053 citizens, Plovdiv is the second largest city behind Ruse, which had 26,163 citizens then, and ahead of the capital Sofia, which had 20,501 citizens then. As of the 1887 census, Plovdiv was the largest city in the country for several years with 33,032 inhabitants compared to 30,428 for Sofia. According to the 1946 census, Plovdiv was the second largest city with 126,563 inhabitants compared to 487,000 for the capital.