Conservative Caroline Johnson has won the Sleaford and North Hykeham by-election, while Labour were pushed into fourth behind UKIP and the Lib Dems.
The Conservatives held the seat, after former MP Stephen Phillips quit, citing "irreconcilable policy differences" with the government.
Dr Johnson won 17,570 votes to beat UKIP's Victoria Ayling, who had 4,426.
Labour slipped from second place in 2015 to fourth - described by one veteran Labour MP as "humiliating".
'Building economy'
Consultant paediatrician Dr Johnson said her election would boost Theresa May's support on Brexit.
She said: "I look forward to strengthening the government's majority in Parliament so Theresa May, our prime minister, can get on with the job of triggering Article 50, leaving the European Union and building a country and economy that works for everyone."
The result in full:
Caroline Johnson: (Conservatives) - 17,570
Victoria Ayling: (
UKIP) - 4,426
Ross Pepper: (
Liberal Democrats) - 3,606
Jim Clarke: (
Labour) - 3,363
Marianne Overton: (Lincolnshire Independent) - 2,892
Sarah Stock: (Independent) - 462
The Iconic Arty-Pole: (Monster Raving Loony Party) - 200
Paul Coyne: (Independent) - 186
Mark Suffield: (Independent) - 74
David Bishop: (Bus Pass Elvis Party) - 55
The seat has returned Conservative MPs since it was formed in 1997 and Mr Phillips, who resigned in November, had a majority of more than 24,000 votes in 2015.
Although he backed leaving the EU, he had since been critical of the government's approach to Brexit.
Dr Johnson won with a 13,144 majority after securing 53.51% of the votes, while UKIP came in second with 13.48%.
Liberal Democrat candidate Ross Pepper won 3,606 votes to clinch third, narrowly ahead of Labour's Jim Clarke who was fourth with 3,363 votes.
labour did well finishing 4th but i can't believe the bus pass elvis party actually got 55 votes