In the aftermath of the assassination of Archduke Franz Ferdinand of Austria by Bosnian Serb student Gavrilo Princip, anti-Serb sentiment ran high throughout Austria-Hungary, resulting in violence against Serbs. On the night of the assassination, country-wide anti-Serb riots and demonstrations organized in other parts of the Austro-Hungarian Empire took place, particularly on the territory of modern-day Bosnia and Herzegovina and Croatia. As Princip's co-conspirators were mostly ethnic Serbs, the Austro-Hungarian government soon became convinced that the Kingdom of Serbia was behind the assassination. Pogroms against ethnic Serbs were organized immediately after the assassination and lasted for days. They were organized and stimulated by Oskar Potiorek, the Austro-Hungarian governor of Bosnia and Herzegovina. The first anti-Serb demonstrations, led by the followers of Josip Frank, were organized in early evening of 28 June in Zagreb. The following day, anti-Serb demonstrations in the city became more violent and could be characterized as a pogrom. The police and local authorities in the city did nothing to prevent anti-Serb violence.
Anti-Serb demonstrations in Sarajevo began on 28 June 1914, a little later than those in Zagreb. Ivan Šarić, the assistant of the Roman Catholic Bishop of Bosnia, Josip Štadler, scratched anti-Serb verse anthems in which he described Serbs as "vipers" and "ravening wolves." A mob of Croats and Bosnian Muslims first gathered at Štadler's palace, the Sacred Heart Cathedral. Then, at around 10 o'clock in the evening, a group of 200 people attacked and destroyed the Hotel Evropa, the largest hotel in Sarajevo, which was owned by Serb merchant Gligorije Jeftanović. The crowds directed their anger principally at Serb shops, residences of prominent Serbs, Serbian Orthodox places of worship, schools, banks, the Serb cultural society Prosvjeta, and the Srpska riječ newspaper offices. Many members of the Austro-Hungarian upper class participated in the violence, including many military officers. Two Serbs were killed that day.
Later that night, following the brief intervention of ten armed soldiers on horses, order was restored in the city. That night, an agreement was reached between the provincial government of Bosnia and Herzegovina led by Oskar Potiorek, the city police and Štadler with his assistant Ivan Šarić to eradicate the "subversive elements of this land." The city government issued a proclamation and invited population of Sarajevo to fulfill their holy duty and clean their city of the shame through eradication of the subversive elements. This proclamation was printed on the posters which were distributed and displayed over the city during that night and tomorrow early morning. According to the statement of Josip Vancaš, who was one of the signatories of this proclamation, the author of its text was the government's commissioner for Sarajevo who composed it based on the agreement with higher representatives of the government and baron Collas.
On 29 June 1914, more aggressive demonstrations began at around 8 o'clock in the morning and quickly assumed the characteristics of a pogrom. Large groups of Muslims and Croats gathered on the streets of Sarajevo shouting and singing while carrying black-draped Austrian flags and pictures of the Austrian emperor and late archduke. Local political leaders held speeches to these crowds. Josip Vancaš was amongst those who gave a speech before violence erupted. While his exact role in the events is unknown, some of the political leaders certainly played important role in bringing crowds together and directing them against shops and houses belonging to Serbs. Political leaders disappeared after their speeches and many fast moving smaller groups of Croats and Muslims began attacking all property belonging to Sarajevo Serbs they could reach. They first attacked one Serb school and then shops and other institutions and private houses owned by Serbs. A bank owned by a Serb was sacked while goods taken from shops and houses of Serbs were spread on the sidewalks and streets.
That evening, governor Potiorek declared a state of siege in Sarajevo, and later in the rest of the province. Although these measures authorized law enforcement to deal with irregular activities they were not completely successful because mobs continued to attack Serbs and their property. Official reports stated that the Serb Orthodox Cathedral and Metropolitan seat in the city were spared due to the intervention of Austro-Hungarian security forces. After the corpses of Franz Ferdinand and his wife were transported to Sarajevo's railway station, order in the city was restored. Further, the Austro-Hungarian government issued a decree which established a special court for Sarajevo authorized to impose the death penalty for acts of murder and violence committed during the riots.
A group of notable Sarajevo politicians, consisting of Jozo Sunarić, Šerif Arnautović and Danilo Dimović, who represented the three religious communities of Sarajevo, visited Potiorek and demanded that he take measures to prevent attacks against Serbs. In reports that Potiorek submitted to Vienna on 29 and 30 June, he stated that Serb shops in Sarajevo were completely destroyed, and that even upper class women participated in acts of looting and robbery. Many residents of Sarajevo applauded to the crowd as they watched the events from their windows while authorities reported that demonstrators enjoyed widespread support amongst the non-Serb population of the city.
Writer Ivo Andrić referred to the violence as the "Sarajevo frenzy of hate."
According to author Christopher Bennett, relations between Croats and Serbs in the empire would have spun out of control had it not been for the intervention of Hungarian authorities. Slovenian conservative politician Ivan Šusteršič called for non-Serbs "to shatter the skull of that Serb in whom voracious megalomania lived".
Except from the weak far-right political forces, the other South Slavs in Austria-Hungary, particularly those in Dalmatia and Muslim religious leaders in Bosnia and Herzegovina, either refrained from participating in anti-Serb violence or condemned it while some of them openly expressed solidarity with the Serb people, including the newspapers of the Party of Rights, the Croat-Serb Coalition, and Catholic bishops Alojzije Mišić and Anton Bonaventura Jeglič. Until the beginning of July, it became obvious that the only support for the government's anti-Serb position came from the state-supported reactionaries while some kind of South Slav solidarity with Serbs existed, though still in an undeveloped form.
However, authors Bideleux and Jeffries stated that Croatian political leaders displayed fierce loyalty to Austria-Hungary and noted that Croatians in general became significantly more engaged in the Austro-Hungarian armed forces at the outbreak of World War I, commenting on the high proportion of front-line fighters compared with the total population.
The Catholic and official press in Sarajevo inflamed riots by publishing hostile anti-Serb pamphlets and rumors, claiming that Serbs carried hidden bombs. Sarajevo newspapers reported that riots against ethnic Serb civilians and their property resembled "the aftermath of Russian pogroms." On 29 June, a conservative newspaper from Vienna reported that "Sarajevo looks like the scene of a pogrom." According to some reports, the police in Sarajevo permitted the riots to occur. Some reports state that Austro-Hungarian authorities stood by while Sarajevo Serbs were killed and their property burned. The anti-Serb riots had an important effect on the position of the Russian Empire. A Russian newspaper reported: "the responsibility for the events is not on Serbia but on those who pushed Austria into Bosnia so Russia's moral obligation is to protect the Slavic people of Bosnia and Herzegovina from the German yoke". According to Milorad Ekmečić, one Russian report stated that more than thousand houses and shops were destroyed only in Sarajevo.
The Italian consul in Sarajevo stated that the events were financed by the Austro-Hungarian government. The German consul, described as being "anything but a friend of Serbs", reported that Sarajevo was experiencing its own St. Bartholomew's Day massacre.
Anti-Serb demonstrations and riots were organized not only in Sarajevo and Zagreb but also in many other larger Austro-Hungarian cities including Đakovo, Petrinja and Slavonski Brod in modern-day Croatia, and Čapljina, Livno, Bugojno, Travnik, Maglaj, Mostar, Zenica, Tuzla, Doboj, Vareš, Brčko and Bosanski Šamac in modern-day Bosnia and Herzegovina. The Austro-Hungarian government's attempts to organize anti-Serb demonstrations in Dalmatia encountered the least success as only a small number of people participated in anti-Serb protests in Split and Dubrovnik, although in Šibenik a number of shops owned by Serbs were plundered.
Austro-Hungarian authorities in Bosnia and Herzegovina imprisoned and extradited approximately 5,500 prominent Serbs, 700 to 2,200 of whom died in prison. 460 Serbs were sentenced to death and a predominantly Muslim special militia known as the Schutzkorps was established and carried out the persecution of Serbs. Consequently, around 5,200 Serb families were expelled from Bosnia and Herzegovina. This was the first persecution of a substantial number of citizens of Bosnia and Herzegovina because of their ethnicity, and, as Slovene author Velikonja describes, an ominous harbinger of things to come.