David Cameron is celebrating after the Tories' massive effort in the Newark by-election was rewarded with a comfortable victory over UKIP and a majority of nearly 7,500.

The Prime Minister said the result was "very good" for the party but it had work to do before the General Election to win voters back from UKIP, who managed to halve the Tory majority.

Speaking in Bayeux, ahead of the D-Day commemoration, he said: "We need to work between now and the next election to say very clearly we have got a long-term plan, we are getting Britain back to work, we are cutting people's taxes, we are helping hard-working people.

"The job isn't finished yet but we are on the right track, let's stick at it."

Conservative candidate Robert Jenrick held the seat with 17,431 and 45% of the vote, with UKIP's Roger Helmer second with 10,028 and 26%. Nigel Farage's party finished fifth in 2010 with just 1,954 votes.

Video:'We're Getting Behind Nick Clegg'

Speaking after the result, Mr Farage said: "I think there'll be an awful lot of Conservatives with a majority of less than 10,000 who will look upon this result in sheer horror."

Labour's Michael Payne finished in third place with 6,842 votes, 18% of ballots cast.

But in yet another dismal result for the Liberal Democrats, their candidate David Watts came sixth, polling just 1,004 votes and 2.5%, and was beaten by an independent and the Green Party candidate.

Business Secretary Vince Cable acknowledged it was a bad result but said he thought that people would realised the Liberal Democrats' contribution to the achievements of the Government by the time of the General Election.

He repeated there was no leadership issue and said he did not think the poor show was due to the row over the leaking of an anti-Nick Clegg poll by the former party peer Lord Oakeshott.

Although they failed to capture the seat, UKIP will be delighted at the big increase in its support, leapfrogging from fourth to second place and almost polling as highly as the party did in Eastleigh, where it came second to the Lib Dems.

Mr Helmer said the result was a "great sign" for the future of his party.

Video:Newark Win 'Good News' For Tories

"We stood in this election hoping to win and planning to win and we have not won but we are encouraged by the fact that we have increased our share of the vote since the general election by a factor of six and we have halved the Conservative majority."

Labour's Mr Payne said he was "extremely proud" of the campaign his party fought and added: "Labour has listened to the people of Newark, campaigning throughout on the issues that matter, especially the future of Newark hospital and the local NHS."

The turnout was a respectable 52.7%, down from 71.5% at the general election, considerably higher than the 2010 average.

The seat was previously held with a majority of 16,152 by the Tory MP and former Army officer Patrick Mercer, who quit after being exposed in a cash-for-questions scandal.

Faced with a UKIP surge, the Conservatives threw everything into the by-election campaign.

Mr Cameron visited the constituency four times during the campaign and Tory MPs - including the most senior Cabinet ministers - were ordered to make at least three visits

Right up to the very last minute, the Tories left nothing to chance.

Led by party co-chairs Grant Shapps and Lord Feldman, up to 100 MPs and 1,000 activists were in Newark on polling day in an all-out effort to stop UKIP winning its first Parliamentary seat.

UKIP found itself heavily outgunned, with only around 200 volunteers rallying support on polling day.

Mr Helmer was not helped by Mr Farage keeping a relatively low profile during the campaign, visiting just once, last Saturday.

On Wednesday he was in Malta speaking at a conference organised by the Institute of Travel and Tourism of the UK in Malta, and did not arrive in Newark until Thursday afternoon.

:: Political Editor Adam Boulton has taken a look at the state of the parties as they gear up for the general election next year. You can find his analysis on the Sky News Catch Up Service, which is free for TV customers with Sky+ HD boxes connected to broadband.