Respect Party candidate George Galloway has taken the Bradford West parliamentary seat from Labour, winning the by-election by 10,100 votes.
Mr Galloway, expelled by Labour in 2003, said it was the "most sensational victory" in by-election history. He received 18,341 votes - a 56% share.
He said his victory represented a "total rejection" of the major parties.
At the 2010 General Election, Labour's Marsha Singh, who resigned on health grounds, won with a majority of 5,763 .
The party had held the West Yorkshire seat since 1974, except for a brief period in the 1980s when the sitting MP defected to the SDP.
Labour candidate Imran Hussein came second with 8,201 votes as the party's share of the vote was 20% down on its 2010 figure.
'Bradford spring'
Conservative candidate Jackie Whiteley was third, with 2,746 votes. Jeanette Sunderland, of the Liberal Democrats, secured 1,505 votes.
Mr Galloway, who co-founded the anti-war Respect Party after being expelled by Labour because of his opposition to the Iraq war, said the result represented the "Bradford Spring".
He said the "mammoth majority" and "mammoth vote" represented a "total rejection" of the three major parties in the British political system.
Mr Galloway urged his former party to turn away "decisively" from the course set by former Prime Minister Tony Blair.
He said Labour "must stop imagining that working people and poor people have no option but to support them if they hate the Tory and Liberal Democrat coalition partners.
"They have to stop supporting illegal, bloody, costly foreign wars because one of the reasons why they were so decisively defeated this evening is that the public don't believe that they have atoned for their role in the invasion and occupation of other people's countries and the drowning of those countries in blood."
Mr Galloway urged his former colleagues to "stop taking their supporters for granted" and "unite the coalition" it once had.
The Respect politician was mobbed by supporters as he left the count.
Labour's candidate did not make a speech after the results were announced, but Labour MP Toby Perkins said the Bradford West result was "desperately disappointing".
He attributed Mr Galloway's success partly to his celebrity status from having appeared on TV reality show Celebrity Big Brother which he said had been "a very significant factor".
Mr Perkins said: "I think frankly there wasn't a lot the other parties could do about it. [Voters had] seen him on Big Brother.
"They wanted him on their streets and now they've got it, and let's hope that he lives up to the promise that he's made to them and actually delivers on the optimism that surrounds his campaign."
'Lone, loud voice'
A Liberal Democrat spokesman said the party was "clearly disappointed" with the result.
"While we were always expecting to fight for fourth in this election, it is quite astonishing for Labour to lose this seat and the Conservatives see such a drop," he said.
Kris Hopkins, the Conservative MP for nearby Keighley, said his party had not won Bradford West for 42 years, so "there were not high expectations".
"It is Labour that have been wiped out tonight. It must be a huge humiliation for Ed Miliband and his team," he added.
BBC Yorkshire political editor Len Tingle said there had effectively been two campaigns in the seat - one with the three main UK parties focused on the economy and jobs, and the other run by Mr Galloway which had his party's anti-war message at its forefront.
BBC political correspondent Chris Mason said there had been a feeling that Mr Galloway might split the left-wing vote, but he had not been expected to defeat Labour.
Our correspondent said the margin of the victory was "extraordinary", adding that it was not simply a matter of the Labour Party losing to Mr Galloway but "being thumped" by him and his party.
He predicted that, once in the House of Commons, Mr Galloway would be "a lone voice but a very loud one".
It is the second time Mr Galloway has upset the political odds - he pulled off one of the results of the 2005 General Election when he overturned a large Labour majority in London's Bethnal Green and Bow to become the Respect Party's first MP.
His win in Bradford West is a remarkable comeback after disappointing showings at the 2010 General Election and the 2011 Scottish Parliament elections.
The outcome was being closely watched by all the parties as a snapshot of voter opinion, following last week's Budget and ahead of council and mayoral elections next month.
The Conservatives came second in the constituency in 2010, on a 65% turnout, ahead of the Liberal Democrats in third. Respect was fifth in 2010.
Prior to Bradford West, there had been five by-elections in England and Scotland since the start of the current Parliament - Oldham and Saddleworth, Barnsley Central, Leicester South, Inverclyde and Feltham and Heston - with Labour retaining all five seats.
The full result (with vote share and change since 2010 in brackets):
George Galloway (Respect) 18,341 (55.89%, +52.83%)
Imran Hussain (Lab) 8,201 (24.99%, -20.36%)
Jackie Whiteley (C) 2,746 (8.37%, -22.78%)
Jeanette Sunderland (LD) 1,505 (4.59%, -7.08%)
Sonja McNally (UKIP) 1,085 (3.31%, +1.31%)
Dawud Islam (Green) 481 (1.47%, -0.85%)
Neil Craig (D Nats) 344 (1.05%)
Howling Laud Hope (Loony) 111 (0.34%)
http://www.bbc.co.uk/news/uk-politics-17549388