When British Prime Minister Theresa May surprised even senior members of her own ruling Conservative party by deciding to hold early elections a full three years before these were due, her personal popularity ratings were well ahead of all her opponents'.
Half of Britain's voters thought she would make a good prime minister, as opposed to only 14 per cent who trusted opposition Labour leader Jeremy Corbyn.
But with just one day of campaigning left before tomorrow's general election, Mrs May's personal popularity ratings have plunged by a full 11 percentage points.
And with Britain suffering the third terrorist attack in as many months, her reputation as a tough politician on security matters has, paradoxically, now become her biggest vulnerability. Few British politicians have suffered such a steep plunge in popular perceptions in the midst of an electoral campaign.
When terrorists struck in central London and Manchester recently, the consensus among political observers was that this would boost Mrs May's electoral fortunes. After all, she was home secretary for six uninterrupted years.
She had a reputation of being as hard as nails on the men of violence. Conversely, Mr Corbyn suffers from a reputation of voting against every anti-terrorism Bill introduced in the past two decades. Mrs May struck an image of resolute calm in the face of the terrorist attacks and looked very much the leader in charge.
But especially since last Saturday's London terror attack, Mr Corbyn has cleverly succeeded in turning the tables on her by reminding voters that under her stewardship as home secretary, overall police numbers fell by around 10 per cent as a result of financial cuts.
"You cannot protect the public on the cheap," said Mr Corbyn, a jibe which resonated with the public.
Mrs May also came under criticism from Mr Peter Kirkham, a former chief inspector of police in London, who warned that the service was in "crisis", and accused her of being "criminally negligent with the safety of the public".
So, what initially appeared as her biggest advantage has now turned into a liability. And her difficulties are compounded by other errors during the electoral campaign.
Mrs May was never a populist. Socially awkward and frequently taciturn in public, she was always more respected than liked, a fact which she turned into a virtue.
As she admitted this week in a speech in central London: "I am not a showy politician; I don't tour the TV studios, I don't gossip about people over lunch, I don't go drinking in Parliament's bars, and I don't often wear my heart on my sleeve."
Having inherited the premiership a year ago from Mr David Cameron, a politician who often did nothing but engage in such socialising activities, she came across initially as a reassuringly no-nonsense politician, an image further underlined by her campaign slogan of "A strong, stable leadership".
Yet almost everything she did in the electoral campaign struck the wrong tone. She made an early decision that the Conservatives' campaign would be about her, rather than the party. This not only downgraded the government's profile, but also allowed Mr Corbyn to occupy the media's attention.
Mrs May also claimed this election was about Britain's departure from the European Union, or Brexit. Yet, apart from claiming the country needed her leadership to conclude EU talks, she said nothing of substance on this point. The election, therefore, remains about everything apart from Europe.
And then there was a disastrous launch of the ruling Conservatives' manifesto, when a proposal to force people to pay for all their old-age care backfired badly with the party's middle-class voters and had to be hastily withdrawn, as well as the current dispute over tackling terrorism. Both are tarnishing Mrs May's claim to provide either stable or strong leadership.
None of this necessarily means the Conservatives will lose the election; the likelihood is that Mrs May will still have commanding parliamentary numbers.
However, in at least one respect, she has already lost. Having run a wooden, accident-prone campaign, she has forfeited her claim to gain a convincing electoral mandate.
She should have romped to victory tomorrow; instead, she is merely limping to the finishing line.