Labour's Emma Lewell-Buck has won the South Shields parliamentary by-election, with UKIP's Richard Elvin coming second.
The result was disastrous for the Liberal Democrats, who were pushed down to seventh place and lost their deposit, and also bad for the Conservatives who picked up just 11.5% of the vote.
[Check our live blog for results coming through in your area]
Ms Lewell-Buck won 12,493 votes, beating Mr Elvin by 6,505 votes in the contest triggered by former foreign secretary David Miliband's decision to quit British politics.
In her victory speech, Ms Lewell-Buck, a social worker, attacked the Government over its austerity programme.
"This by-election was a choice between a one nation Labour party that will work with communities to turn this country around, and David Cameron's Tory-led Government which has taken this country in the wrong direction," she said.
"I will help get people back to work, champion our wonderful town and never give the Tory Government one moment's peace."
She went on to tell Sky News she was eager to "deliver on all my pledges - to increase jobs, investment and growth, and fight the Tories on bedroom tax".
Runner-up Mr Elvin said it had been an "absolutely fantastic" result for UKIP.
He told Sky News: "We had a terrific team here and they worked fantastically hard, and to go from nowhere to take 24% has been just absolutely stunning.
"We will keep on fighting every election which is offered to us and it is only a matter of time until we'll achieve our first success in Westminster."
[Local election analysis: What does the rise of Ukip mean?]
Tory candidate Karen Allen was disappointed by her poor showing, telling Sky News: "We are really listening to what the electorate want and we are going to be responding to that.
"There's a message here from South Shields. I have heard it very clearly and I am sure the Conservatives are listening very attentively."
Crestfallen Lib Dem candidate Hugh Annand, who got just 352 votes, told Sky News: "The fact that we did not do particularly well in a constituency like this where we have never done particularly well is not a disaster for the party nationally by any means.
"It is a gentle reminder not to just my own party leader but politicians in London generally that they should come to pay more attention to the North East, and if that's the lesson we can learn from this then I think everyone will benefit."
Former Lib Dem MP Lembit Opik described the result as "appalling" and demanded a "credible explanation from Nick Clegg regarding the recovery strategy".
Mr Opik, who lost his Montgomeryshire seat in 2010, said: "Veteran members deserve to know how this electoral crisis will be fixed."
The full results of by-election:
Emma Lewell-Buck (Lab) 12,493 (50.51%, -1.51%)
Richard Elvin (UKIP) 5,988 (24.21%)
Karen Allen (Con) 2,857 (11.55%, -10.04%)
Ahmed Khan (Ind) 1,331 (5.38%)
Phil Brown (Ind Soc) 750 (3.03%)
Lady Dorothy MacBeth Brookes (BNP) 711 (2.87%, -3.65%)
Hugh Annand (Lib Dem) 352 (1.42%, -12.79%)
Howling Laud Hope (Loony) 197 (0.80%)
Thomas Darwood (Ind) 57 (0.23%)
Turnout was 39.28%.