The conflict between Slav nationalism and German Nationalism ultimately led to war.
Serbian nationalism was of greater danger to Austria-Hungary because it was backed by Russia as Russia supported Pan Slavism whilst Germany was defending Pan Germanism of the German empire and Austria-Hungary.
Germany and Austria-Hungary had a Pan German alliance thus Germany came into the Sarajevo conflict because she could not allow Austria-Hungary to be destroyed by Pan Slavism.
The Bosnian crisis of 1908
Austria-Hungary had been given Bosnia and Herzegovina to administer at The Berlin Conference of 1878.
Serbia which had an interest in these two territories was disappointed and encouraged the Young Turk revolution that sought to overthrow the Sultan Hamid II and bring about liberal reforms.
Austria-Hungary took advantage of the ensuing chaos.
Austria-Hungary annexed Bosnia and Herzegovina whilst Russia annexed the Straits.
Serbia mobilized her troops against Austria-Hungary.
Russia threatened to join Serbia against Austria-Hungary.
Germany threatened war against Russia if Russia supported Serbia and this nearly brought about the outbreak of a general war.
Russia backed out because she had not yet recovered from the Russo-Japanese war.
Serbia backed out because she could not fight Austria alone.
This increased the strain between the Triple Alliance and Triple Entente camp.
The First Balkan war
Italy went to war with Turkey over Tripoli which she had annexed and the Albanians took advantage of the situation to revolt against Turkey.
The Turkish Army mutinied in sympathy of the revolt.
The Balkan nationals made up of Greece, Serbia, Montenegro and Bulgaria took advantage to eject Turkey from the Balkans and formed the First Balkan League to fight Turkey.
They agreed that Serbia would annex Albania so as to have access to the sea.
Greece would occupy Thrace and Salonika.
Bulgaria would take a larger part of Macedonia and the rest of Macedonia would be shared equally amongst the members.
To the surprise of Europe the league won the war against Turkey.
A conference was called in London in May 1913.
The treaty of London (1913)
Germany and Austria-Hungary blamed Russia for causing the Balkan war.
Austria-Hungary did not like Serbian expansion because both had large Slav populations especially Bosnia and Herzegovina.
Germany feared that the Balkan league would continue to fight Austria-Hungary to take back Bosnia and Herzegovina.
At the conference Austria-Hungary blocked Serbia’s annexation of Albania and a new state of Albania was created.