Respect Party founder George Galloway has defeated Labour's Oona King in the east London constituency seat of Bethnal Green and Bow.
The former Labour MP, expelled from the party for branding Tony Blair and US president George Bush "wolves" for invading Iraq, won 15,801 votes.
Ms King - "a Blair babe" - came second with 14,978, with the Conservatives and Liberal Democrats a distant third and fourth.
Mr Galloway, who overturned Ms King's 10,057 majority, won favour among the thousands of Muslims in the seat for his anti-Iraq war stance.
On winning the seat, Mr Galloway had a message for Tony Blair. He said: "This defeat you have suffered is for Iraq and the other defeats that New Labour has received this evening are for Iraq."
"All the people you have killed, all the lies you have told have come back to haunt you. The best thing the Labour Party can do is sack you tomorrow morning."
The battle between George Galloway and Oona King had been fierce at times. The former Glasgow Kelvin MP won an apology, legal costs and a £1,000 donation after she made claims of sexual impropriety on his part.
During one week in late April, Mr Galloway was ambushed at a meeting by an extremist Muslim sect opposed to the idea of Muslims voting, and Ms King had to be protected by police while on a walkabout with London Mayor Ken Livingstone. She has also had eggs thrown at her and claims her car's tyres had been slashed.
But Mr Galloway insisted the defeat was not about Oona King. "The defeat was not her defeat this evening, it was a defeat for Tony Blair," he said.
See the results for Bethnal Green & Bow in full.
Read the Bethnal Green & Bow Constituency Focus