A retired Marine who lost his leg in combat is inspiring the nation by completing the Boston Marathon while carrying the flag that helped him get through his recovery.

Staff Sergeant Jose Luis Sanchez ran the 26.2mile race Monday in Boston on a prosthetic left leg while carrying a flag signed by the Marines he fought alongside.

Sanchez lost the lower part of his leg six years ago while on patrol in Afghanistan, when he stepped on an IED.

'It’s not for me, it’s for others to be inspired, to be motivated,' he said of running the race in an interview with WBZ.

Scroll down for video

Staff Sergeant Jose Luis Sanchez ran the 26.2mile race Monday in Boston on a prosthetic left leg while carrying a flag signed by the Marines he fought alongside

Sanchez lost the lower part of his left leg six years ago while on patrol in Afghanistan, when he stepped on an IED

'We live for others — I’ve learned that throughout being angry and frustrated and all that PTSD,' said Sanchez (pictured at a January race)

Sanchez (right) was on patrol in Afghanistan in 2011 when he stepped on an IED

Sanchez was severely injured in both legs, and lost part of his left leg to an IED

Sanchez finished the grueling race in five hours, 21 minutes and 56 seconds.

The retired Marine ran a marathon in Washington, DC in 2015, as well as last year's Boston Marathon.

He said the flag was sent to him while he was recovering from his devastating injury, but because he was feeling bitter and anti-social as he struggled to cope with the loss of his leg, he waited years to unfurl it.

Now he views the flag as a symbol for giving back and helping others.

'We live for others — I’ve learned that throughout being angry and frustrated and all that PTSD,' he said.

'I’m channeling that to do positive and give back to whatever I’ve taken from the community.'

Courtesy of Jose Luis Sanchez

'It’s not for me, it’s for others to be inspired, to be motivated,' Sanchez said of running the race