Election results: Conservatives on course for majority
David Cameron says he hopes to govern for all of the UK as a BBC forecast gives the Tories 329 seats - enough to form a slender majority in the Commons.
The prime minister said it was "too early to say" the final result but he hoped to form a government.
Labour has been all but wiped out by the SNP in Scotland and is failing to make enough gains in England and Wales.
The Lib Dems are heading for as few as eight MPs, with Vince Cable, Ed Davey and Danny Alexander losing their seats.
The BBC forecast, with well over half of the results now in, is Conservative 329, Labour 233, the Lib Dems eight, the SNP 56, Plaid Cymru three, UKIP two, the Greens one and others 19.
Mr Cameron all but declared victory in a speech after being returned as MP for Witney, in which he set out his intention to press ahead with an in/out referendum on Britain's membership of the European Union and to complete the Conservatives' economic plan.
"My aim remains simple - to govern on the basis of governing for everyone in our United Kingdom," he said.
"I want to bring our country together, our United Kingdom together, not least by implementing as fast as we can the devolution that we rightly promised and came together with other parties to agree both for Wales and for Scotland.
"In short, I want my party, and I hope a government I would like to lead, to reclaim a mantle that we should never have lost - the mantle of One Nation, One United Kingdom. That is how I will govern if I am fortunate enough to form a government in the coming days."
Mr Cameron has returned to Downing Street with his wife Samantha and is expected to hold an audience with the Queen later on Friday.
Chancellor George Osborne said the Conservatives had been "given a mandate to get on with the work we started five years ago" and would follow the "clear instructions" of the British public.
Speaking in Doncaster, where he retained his seat, Labour leader Ed Miliband said; "Clearly this has been a very disappointing and difficult night for the Labour Party.
"We haven't made the gains we wanted in England and Wales and in Scotland we have seen a surge of nationalism overwhelming our party."
He said the next government had a "huge responsibility" and a difficult task to "keep our country together".
Mr Cameron looks like he will form a majority Conservative government, without the need for a coalition or the formal support of other parties.
The finishing line needed to form an absolute majority is 326, but because Sinn Fein MPs have not taken up seats and the Speaker does not normally vote, the finishing line has, in practice, been 323. In this election, Sinn Fein kept four seats.
Labour has been hammered in Scotland by the SNP, with Nicola Sturgeon's party seizing 56 of the nation's 59 seats.
Jim Murphy, leader of the Scottish Labour Party, and shadow foreign secretary Douglas Alexander have both lost their seats to the SNP, which is benefiting from a 27% average swing from Labour.
Conceding defeat, Mr Murphy said it had "proven hard to turn round years of difficulties with the Scottish Labour Party in just five short months".
He congratulated the SNP on the scale of their victory but said he intended to continue as the party's leader in Scotland.
Mr Clegg said: "It is now painfully clear this has been a cruel and punishing night for the Liberal Democrats.
"The election has profound implications for the country and for the Liberal Democrats.
"I will be seeking to make further remarks about the implications of this election - both for the country and for the party that I lead and for my position in the Liberal Democrats - when I make remarks to my colleagues in the Liberal Democrats later this morning when I return to Westminster."
Speaking at the start of the night, the Lib Dem election chief Lord Ashdown told the BBC: "If this exit poll is right I will publicly eat my hat."
Labour has failed to make the headway it wanted in the South of England and the Midlands, failing to take its top target seat, Warwickshire North, back from the Conservatives.
Its progress in London has not been as strong as pre-election polls suggested although it did win a number of seats from other parties.
Douglas Carswell has held Clacton for UKIP and it could end up in third place in the national vote share but fellow Tory defector Mark Reckless has lost his seat.
Green Party leader Natalie Bennett fell to an expected defeat in Holborn and St Pancras, finishing in third place.
But the party appears to have increased its share of the vote, including in some of the big northern cities. The Greens are now predicted to get one seat - Brighton Pavilion, which the party won in 2010 and has retained. This is down from the initial exit poll forecast of two MPs.
A total of 650 Westminster MPs will be elected, with about 50 million people registered to vote.
There are also more than 9,000 council seats being contested across 279 English local authorities.
Mayors will also be elected in Bedford, Copeland, Leicester, Mansfield, Middlesbrough and Torbay.
Source: BBC