Relations between Austria-Hungary and Serbia deteriorated in the aftermath of the May Overthrow in 1903. Almost immediately, the new Karađorđević government aligned itself with the Russian Empire and oriented its foreign policy away from its long time patron, the Habsburgs, and Austria-Hungary. In 1906, Austria-Hungary closed its border to Serbian agricultural exports in an episode known as the Pig War. In 1908, Austria-Hungary formally annexed Bosnia-Herzegovina—a territory with a large Serb population that it had been granted by the Congress of Berlin in 1878. The annexation prompted the Serbian public to call for war with Austria-Hungary. With no promise of Russian support in the event of war, the Serbian government decided against pursuing the matter militarily. Count Franz Conrad von Hötzendorf boasted that it would take Austro-Hungary only three months to defeat Serbia should war erupt between the two nations.