A British soldier who lost control of both his legs after a rocket attack in Iraq has completed the London marathon, almost two weeks after he started.

Major Phil Packer completed the 42 kilometre course on crutches, defying doctors who told him he would never walk again.

He walked two miles a day since the marathon started on April 26, and was greeted by hundreds of well-wishers who lined the final mile.

The 36-year-old said this was an important victory for him.

"It makes you want to do things like that. It makes you want to carry on and show that disability doesn't stop you from doing anything," he said.

"I've changed as a person, [and I] understand disability a lot more. I feel very fortunate that I'm able to stand and able to walk again."

Major Packer raised 630,000 pounds ($1.25 million) for the Help For Heroes soldiers' charity, which helps injured servicemen and women, and is hoping to raise enough to reach the one-million-pound mark.

"I've walked 52,400 steps and somebody has walked with me every step of the way, be it a dinner lady, a London taxi driver or a metropolitan police officer," he said upon completing the marathon.

"I've had time to talk to people and have conversations, people have really opened up about their feelings about the [armed] services and it has been humbling."