[2] In June 1914, Lojka accompanied his employer and his friend Archduke Franz Ferdinand, the heir to the throne of the Austro-Hungarian Dual Monarchy, on a trip to Bosnia and Herzegovina.
There, on 26 and 27 June, the Archduke, in his capacity as "Inspector of the entire armed forces", took part as an observer in a manoeuvre of the Austro-Hungarian Army outside Sarajevo.
As a result, Lojka was given the task of picking up the Archduke and his companions at the Sarajevo train station on the morning of June 28 and driving them to the city center and all other destinations on the day's program.
In Franz Ferdinand's motorcade, which consisted of seven vehicles, the "heir to the throne" vehicle, with Lojka at the wheel, sitting on the front right (right-hand drive), drove in third place On the way from the train station to the town hall, there was a first assassination attempt: the young Nedeljko Čabrinović tried to throw a bomb on the car of the heir to the throne.
After the assassination attempt – the fatal outcome of which was overlooked for a few seconds, as it was believed that the heir to the throne had only been slightly injured and his wife had fainted – Lojka turned the vehicle around on Potiorek's instructions and steered it to his official residence, the so-called Konak.
He was the chauffeur of Archduke Franz Ferdinand, he drove his car on the day of the accident.Later, the emperor took Karl Lojka into his service, and when the coup came, he was compensated with 400,000 crowns, with which he bought an inn in Brno.
'"Time magazine described Lojka in an obituary as "famed as the chauffeur who drove the automobile which carried Archduke Francis Ferdinand at Sarajevo to his assassination".