The father of a British military policeman killed in Iraq recorded 4,252 votes standing against Tony Blair in his Co Durham constituency of Sedgefield.
Reg Keys said his result sent "a clear and resounding message about the Iraq war".
Mr Keys's son Tom (20) was one of six military policemen killed after they were attacked by a crowd of Iraqis in one of the worst days of the conflict for British troops.
Mr Keys said he dedicated his campaign to the 88 British servicemen killed since the start of the war in 2003.
He added: "Fighting this campaign has not been an easy task for me, but I had to do it for my son Thomas . . . who was sent to war under extremely controversial circumstances.
"If this war had been justified by international law I would have grieved but not campaigned. If weapons of mass destruction had been found in Iraq, again I would have grieved but not campaigned."
Mr Blair looked straight ahead and was stoney-faced as Mr Keys said: "Tonight there are lessons to be learnt. I have it in my heart that one day the prime minister may be able to say sorry. That one day he will say sorry to the families of the bereaved and one say the prime minister might be able to visit wounded soldiers in hospital.
"Then our campaign will not be in vain and all the people who have given me their vote tonight have sent a clear and resounding message about the Iraq war. Thank you for all the people that voted for me tonight," Mr Keys said.
PA