Liberal Democrats have claimed victory in the Eastleigh by-election as a late surge by the UK Independence Party threatened to cause David Cameron a big political headache.
Votes are still being counted in the seat vacated by ex-Cabinet minister Chris Huhne when he resigned in disgrace after admitting perverting the course of justice.
Lib Dems have said they are already certain of retaining the Hampshire seat in the first head-to-head contest with the Conservatives since they joined them in the coalition Government.
It is also clear, however, that Ukip has eaten dramatically into both parties' vote and could push the Conservatives into third place - a significant blow to the Prime Minister.
Turnout was 52.8% - high for a by-election and a reflection of the massive attention given to the contest which has seen Lib Dem leader Nick Clegg and Mr Cameron make several personal appearances on the campaign trail.
Defeat in one of the target seats considered crucial to securing an overall majority at the next general election would itself have increased backbench pressure on the Prime Minister.
But finishing behind Ukip would represent a "crisis", influential Tory MP David Davis has declared.
Ukip leader Nigel Farage, who considered running himself, has said he would be "very disappointed" if his party, which has performed well in recent by-elections, came third.
A successful defence of the 3,864 majority secured by Mr Huhne in 2010 would be a conspicuous triumph for the Lib Dems, whose national opinion poll ratings have plummeted since going into government with the Tories.
It has a strong local base, holding all of the local council seats within the constituency, but has seen its campaign overshadowed by sexual harassment claims - strongly denied - against ex-chief executive Lord Rennard.