On June 28th, 1914, the heir to the throne of the Austro-Hungarian empire, fifty-year old Archduke Franz Ferdinand, was assassinated in Sarajevo by a 19-year-old Bosnian-Serb nationalist. The assassination began an at first slow-moving diplomatic crisis which would result a month later, July 28th, in Austria-Hungary declaring war on Serbia.
The assassination plot itself was so badly botched that its success is one of the surprising events of history. A group of Bosnian-Serb nationalists (half of them teenagers) -- who wanted Bosnia-Herzegovina to be independent from Austria-Hungary and integrated into a pan-Slavic state -- had received bombs, pistols and cyanide pills from officers in the Serbian army sympathetic to their cause. They planned an assassination attempt against the Archduke and his wife and stationed themselves along the route which their open car would travel through the city. Several of the assassins failed to make any move when the car passed and another threw a bomb at the car, however the bomb bounced off the folded convertible hood, fell behind the car, and exploded, disabling the next car in the motorcade and injuring a number of bystanders. The assassin who had thrown the bomb bit a cyanide capsule and jumped off a bridge, but the cyanide only made him sick and the fall wasn't far and the river nearly dry, so he was quickly arrest by police (though not before members of the angry crowd beat him.)
Determined to show they were undaunted by the failed attack, Archduke Ferdinand and Sophie performed their visit to the city hall, where they were formally greeted by the major and the Archduke made a brief speech in which he mentioned the attack but thanked the people of Sarajevo for their supportive response to him.
The Archduke and his wife then decided to visit those wounded in the attack and got back into their motorcade to proceed to the hospital. The motorcade took a wrong turn, and one of the would-be-assassins, Gavrilo Princip, (who had repaired to a delicatessen when the assassination attempt failed) stepped out into the street and saw the Archduke's car, which had taken a wrong turn, gone to reverse, and then stalled. Princip rushed the car and fired two shots at a distance of five feet, one of which pierced Franz Ferdinand's jugular vein and the other of which wounded Sophie in the stomach. Both were dead by the time the car reached the governor's residence where they were rushed for medical treatment. Franz Ferdinand's last words were, "Sophie, Sophie! Don't die! Live for our children!"
When Austria-Hungary declared war on Serbia, Russia mobilized its armies to potentially intervene in protection of Serbia. Germany demanded the Russia cease mobilizing, and when it failed to do so declared war on Russia on August 1st and France and Belgium on August 3nd. Thus began the First World War.
Princip was spared the death penalty because he was a month short of the legal age of 20 at the time of the assassination. He was sentenced to twenty years in prison, but died of illness in 1918.