Polls have closed in the Newark parliamentary by-election triggered by disgraced ex-Tory Patrick Mercer's decision to stand down.
The Conservatives are on course to hold off the threat from Ukip but only with a massively-reduced majority, according to polling.
Mr Mercer, who quit over what a sleaze watchdog said was the worst breach of transparency rules it had dealt with, won by 16,152 votes from Labour in 2010.
Ukip finished a distant fifth at the general election, more than 25,000 votes behind him, b ut the party is now seeking to translate its dramatic victory in European elections into representation at Westminster.
It has put up MEP Roger Helmer - re-elected to the European Parliament in the party's "earthquake" victory last month - to take on Conservative Robert Jenrick.
The Conservatives have flooded the town with dozens of MPs in a sign of the depth of concern, with Prime Minister David Cameron visiting four times.
During a visit to the market town as voters went to the ballot box, Nigel Farage insisted Ukip had "never, ever said this was a winnable by-election" but said they expected support to be solid.
Polls suggest Labour - which came second in 2010 - will come third with the Liberal Democrats braced for another battering.
The junior coalition partner outpolled Ukip by more than five votes to one at the general election but is expected to see its vote slashed.
Under-pressure Deputy Prime Minister Nick Clegg will hope at least to avoid the humiliation of his candidate David Watts finishing behind David Bishop of the Bus Pass Elvis party.
In March, Mr Bishop finished ahead of the Lib Dems in a city council by-election in the Clifton area of Nottingham.
There are 11 candidates in the by-election: Robert Jenrick (C); Michael Payne (Lab); David Watts (Lib Dem); David Kirwan (Green); Paul Baggaley (Ind); David Bishop (Bus Pass Elvis); Nick The Flying Brick (Monster Raving Loony); Andy Hayes (Ind); Roger Helmer (Ukip); Dick Rodgers (Stop Commercial Banks Owning Britain's Money); Lee Woods (Patriotic Socialist).