In the 16th century, there were two vilayets in Hungary; their number increased to four at the turn of the 17th century and to six after 1660. The largest of them, the vilayet of Buda, was loss-making throughout the period, with the exception of a few years. The Buda vilayet received financial support from the central treasury during the 16th century and from the campaign treasury during the Long War at the turn of the 17th century. Subsequently, in the 17th century, roughly 70 per cent of its military expenditure was covered by state revenues from the Balkan Peninsula. In the latter decades of the 16th century, the Temeşvar vilayet produced a financial surplus. It suffered financial woes during the war at the turn of the century but recovered thereafter. In the early 17th century, the Eger vilayet used its own revenue to pay for more than half of its costs, but the losses of the Kanija vilayet resembled those of Buda. The Varad vilayet in the east of the country was financially self-sufficient, while the Uyvar vilayet , established in the approaches to Vienna, was funded entirely by the central treasury. To sum up: in the stricken western vilayets , which were devastated by the military campaigns, local revenues met no more than one third of military costs; meanwhile, the three eastern vilayets , which were less affected by conflict, were for the most part self-sufficient.