The Customs War or Pig War (Serbian: Царински рат/Carinski rat, Свињски рат/Svinjski rat) was an economic conflict between the Habsburg Empire and Kingdom ofSerbia in 1906 - 1909, in which the Habsburgs imposed a customs blockade on Serbian pork.
At the beginning of the twentieth century Serbia was (economically at least) little more than a satellite of the Habsburg empire, its major export being pork, most of which was bought by the Austro-Hungarian Empire. When Serbia started trying to evade economic and political control by the Habsburgs, and build links with other countries, particularly Bulgaria and France, Vienna decided to punish the Serbs with economic sanctions. Specifically, in an attempt to reduce its economic dependence on the Austro-Hungarian Empire, in 1904 Serbia began to import French rather than Austrian munitions and established a customs union with Bulgaria in 1905, making tariff-laden Austrian goods unsalable in Serbia.
Long used to setting economic policy, Austria responded in 1906 by closing its borders to Serbian pork. These failed, and Serbia found other markets for its pork. Serbia refused to bow to Vienna, gained French investment to build new packing plants for international trade, began to order materials from the Austrian rival Germany, and pressured the Austrian-administrated provinces of Bosnia and Herzegovina for a trade outlet on the Adriatic Sea. This can be seen in the trade statistics of the period in question, as published in the 1911 edition of the Encyclopaedia Britannica.
Russia supported Serbia's actions, and war between Austria-Hungary and Russia was averted only because of a German ultimatum in 1909 demanding the cessation of Russian aid to Serbia