He is best remembered in Serbian history books for his dramatic order to his troops issued on October 7, 1915, the first day of the defense of Belgrade against the Austro-Hungarian and German attack during the First World War.
Holding the rank of major, Gavrilović at the time commanded the 2nd battalion of the 10th Infantry Regiment, which, along with a detachment of Belgrade gendarmerie and a group of about 340 volunteers from Syrmia, was defending positions at the very confluence of Sava and Danube, beneath the Kalemegdan Fortress.
The Serbian position grew worse every minute because of an incessant flow of Austro-Hungarian reinforcements and a vast superiority in artillery, which the Serbs countered by employing close-quarter tactics.
Before throwing them into a counterattack, Major Gavrilović rallied them with a call to arms:[2] Soldiers, exactly at three o'clock, the enemy is to be crushed by your fierce charge, destroyed by your grenades and bayonets.
The timely intervention of Austro-Hungarian river monitors which approached the shore to deliver point-blank artillery fire with much-reduced fear of hitting their own troops, and to which the engaged Serbian units had no effective counter, played a major role in defeating the attack.
But the charge and similar acts of bravery and self-sacrifice by Serbian troops and by the inhabitants of Belgrade during the battle earned deep respect from the invaders, who suffered around 10,000 casualties in the course of capturing the city.
[3] Gavrilović was carried back by the survivors of his regiment,[2] he was awarded the Serbian war medal, Karadjordje's star, the French Croix de Guerre, among others.
Swedish heavy metal band Sabaton wrote the song "Last Dying Breath" from their album The Last Stand in his honor, referencing quotes by him in the lyrics.