Bosnia was annexed by Austria-Hungary in 1908, and Serbia had reasons to believe it might be annexed too. Both countries wanted independence. Additionally, Serbia had hopes to annex Bosnia themselves, so Austria's posession of Bosnia was not a desired situation for them.