Britain's Prime Minister David Cameron was at his political peak just last year as he led his Conservative Party to an outright majority in Parliament for the first time in more than two decades, surpassing all the forecasts.
Today, his political career is effectively over, the result of another surprise at the ballot box — the United Kingdom's vote to leave the European Union.
"This is how a political life ends: with a crash, not a whimper," Scottish journalist Alex Massie wrote in Foreign Policy. "David Cameron's place in history is now assured. He is the man who took the United Kingdom out of the European Union."
Which is exactly the opposite of what Cameron intended.
As part of last year's highly successful campaign, Cameron pledged to hold a referendum on EU membership. It was a promise he didn't have to make and didn't really want to keep. He favors a U.K. in the family of Europe, but bowed to pressure from his own party, which includes many leading Euro-skeptics.
Cameron's intent was to silence those critics with a vote reaffirming Britain's commitment to the EU. But the result has put the country on the EU off-ramp and brought an abrupt end to his six years as prime minister.
"I was absolutely clear about my belief that Britain is stronger, safer and better off inside the European Union, and I made clear the referendum was about this and this alone — not the future of any single politician, including myself," an emotional Cameron said Friday morning at 10 Downing St., the prime minister's office.
He said he would step down, though he'll serve as a caretaker until a new prime minister is chosen by his fellow Conservatives. The aim is to have a new leader in place by the time the Conservatives hold a party conference in October, he said.
Cameron had successfully navigated many potential pitfalls since becoming prime minister in 2010. He was on a winning streak and had reason to think he was on safe ground with the EU referendum.
Two years ago, Cameron sanctioned a referendum on Scottish independence, and successfully campaigned for its defeat by a convincing margin.
He called last year's triumph in the parliamentary elections "the sweetest victory of all."
While not great, Britain's economy has been one of the better performers in underperforming Europe.
And despite Britain's mixed feelings about being tied to Europe, the U.K. has been a Euro member for more than four decades. Britain signed up in 1973, back when it was called the European Economic Community. Just two years later, the country held a referendum on leaving, yet voters chose overwhelmingly to stay by a 2-to-1 margin.
But Cameron miscalculated this time.
The two overriding issues were the economy and immigration, and they were closely linked.
For the young and well-educated working in London's financial community, globalization has been a roaring success, filled with opportunities. For working-class citizens with stagnant wages, immigration and EU policies were often the scapegoat.
Cameron pledged to limit immigration to fewer than 100,000 people a year. Yet the free movement permitted under EU rules meant Cameron was in no position to stop the influx from other EU countries, which accounted for more than half of the 330,000 in net migration to Britain last year.
"Perhaps one day, even David Cameron will be able to appreciate the irony of his downfall: the man who became Conservative leader promising to end the party's appetite for strife over Europe has been destroyed by his decision to feed that hunger," wrote James Kirkup in The Telegraph. "For now though, he could be forgiven for a touch of bitterness about how cruelly political fortunes can turn."
Greg Myre is the international editor of NPR.org. Follow him @gregmyre1.