Respect Party candidate George Galloway has taken the Bradford West parliamentary seat from Labour, winning the by-election by 10,140 votes.

Mr Galloway, expelled by Labour in 2003, said it was the "most sensational victory" in by-election history.

Labour leader Ed Miliband said it was "incredibly disappointing" and the party needed to "learn lessons".

At the 2010 General Election, Labour's Marsha Singh, who resigned on health grounds, won with a majority of 5,763 .

'Bradford spring'

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.

An extraordinary result but surely a one-off political coup by a political one-off

Mr Galloway won 18,341 votes, a 56% share of the total vote. 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.

Conservative candidate Jackie Whiteley was third, with 2,746 votes. Jeanette Sunderland, of the Liberal Democrats, secured 1,505 votes - the party lost its deposit.

Mr Galloway, who co-founded the anti-war Respect Party after being expelled by Labour because of comments he made as part of his opposition to the Iraq war, said the result represented the "Bradford Spring".

'Very disappointed'

He said the "mammoth vote" represented a "total rejection" of the three major parties in the British political system.

AT THE SCENE George Galloway was carried out of the sports centre where the votes had been counted, on the shoulders of his supporters. "Galloway! Galloway!" they screamed jubilantly. A small of convoy of cars, covered in Respect posters and flags, then completed a celebratory lap around an otherwise deserted football field, at 3am. Why did George Galloway win here? Firstly, he appears to have galvanised some who feel ignored, even disenfranchised by the main political parties. An element of that is due to a specific local issue, the regularly delayed renovation of the city centre. For others, in a multi-ethnic constituency, the call for the immediate withdrawal of troops from Afghanistan was appealing. For others still, this was a mid-term by-election. It wasn't about choosing the next government, but sending a powerful message, selecting a noisy, high profile advocate to represent them. Handing George Galloway a 10,000 vote majority certainly does that.

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 Miliband said the result had been unexpected and the reasons for it were "not simple".

"We should have won this by-election and I am very disappointed we did not," he said.

"I think this was to do with local factors that were particular to the constituency and we have got to understand those lessons."

He said he would travel to Bradford in the near future to start the process of trying to "win back people's trust".

A Liberal Democrat spokesman said the party was "clearly disappointed" with the result while David Ward, Lib Dem MP for Bradford East, said Mr Galloway still spoke for the old Labour Party.

"This was the Asian community within Bradford, really, who are in some ways punishing the Labour Party for abusing them and using them in the past," he said.

But Salma Yaqoob, the Respect Party leader, said it was "patronising" to suggest that Mr Galloway - a critic of the UK's mission in Afghanistan - had been dependent on support from Muslims for his victory.

'Spectacular' loss

She told Radio 4's Today programme: "Look at the result...Over 50% of the vote. That is not just one community coming out to vote. That is young, old people, people across all areas. In fact in every area across the constituency, Respect won."

ANALYSIS George Galloway's victory is the first time an independent or smaller party candidate has won a Parliamentary by-election from another party in Britain since March 1973, when Dick Taverne won the Lincoln by-election (taking it from Labour). It is also the first time since the May 2000 Romsey by-election (when the Conservatives lost to the Lib Dems) that the main Opposition party has lost a seat in a by-election. Bradford West is not a typical seat. In the great Labour landslide of 1997, when the Conservatives suffered their worst result since 1832, Bradford West swung their way, although it did stay Labour. In the 2010 general election, when there was a national swing of 5.1% to the Conservatives, and a regional swing of 6.8% to the Conservatives in West Yorkshire, Bradford West swung 2.7% to Labour. This does not detract from Mr Galloway's remarkable victory, nor lessen Labour's embarrassment at losing its seat but it prompts the need to be cautious about reading great national trends into this result.

Conservative Party co-chair Baroness Warsi said Mr Galloway had clearly "connected" with the electorate and suggested the result was disastrous for Labour.

"If Ed Miliband can't get his act together after a week like this when is he going to get his act together?" she told BBC Radio 4's Today programme.

"This is a Labour seat, has been for many, many decades and last night they lost it in spectacular fashion."

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.

Turnout in the by-election was just over 50%, compared with 64.9% in the 2010 general election.

Bookmakers said they had taken a lot of money on Mr Galloway in the days leading up to the poll and had slashed the odds on him winning. Ladbrokes said they faced paying out up to £100,000 in winning bets.

It is the second time Mr Galloway has upset the political odds - he pulled off one of the most memorable 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. With a different candidate, Respect only came fifth in Bradford West in the 2010 General Election.

Labour have won all five previous by-elections in England and Scotland since the 2010 General Election.

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%)