 In the first half of the 19th century, Novi Sad was the largest Serb city; in 1820 this city had about 20,000 inhabitants, of whom 2/3 were Serbs.The Matica Srpska moved to Novi Sad from Budapest in 1864.The Serbian gymnasiums of Novi Sad and Sremski Karlovci were at the time considered to be among the best in the Habsburg Kingdom of Hungary.