A soldier who suffered a severe injury while serving in Iraq in 2004 has died and was laid to rest with full military honors.

"I learned a lot from Joey, but the thing I learned most was how great the human spirit was," said Terry Masterson of his friend, former U.S. Army Sgt. Joel Gomez, according to a Wednesday Associated Press report.

Gomez, 42, died earlier this month of pneumonia and kidney problems. The former soldier had been living with quadriplegia after a catastrophic injury while serving in Iraq nearly two decades ago.

ARMY GENERAL WHO COMMANDED IN IRAQ DIES OF CANCER AT AGE 67

Taps played at military funeral

A U.S. Army Honor Guard bugler plays taps at St. Jerome Cemetery in Holyoke, Massachusetts, during a graveside service for Korean War soldier Cpl. Jules Hauterman Jr., whose remains were identified more than 60 years after he was killed in battle. (Christopher Evans/MediaNews Group/Boston Herald via Getty Images)

During a 2004 combat mission aimed at capturing enemy soldiers who had been firing on his base, the armored vehicle Gomez was riding in plunged into the Tigris River, resulting in the Illinois native breaking his spine in two places.

During a prayer service for Gomez Monday, family and friends said that Gomez maintained his sense of humor and desire to keep learning despite the severe injuries.

UNCLAIMED CREMAINS OF 5 MILITARY VETERANS BURIED WITH FULL HONORS AT NATIONAL CEMETERY IN MICHIGAN

However, Gomez spent his final days wishing he could return to the accessible home that was built for him by his hometown community of Wheaton, Illinois, and asking for longtime caretaker Elva Cuahquentzi, who had to return to Mexico after facing immigration issues and has not been able to return to the United States.

Arlington National Cemetery

Over 4,400 U.S. servicemembers have died from injuries sustained during the Iraq War. (Photo by Mark Wilson/Getty Images)

CLICK HERE TO GET THE FOX NEWS APP

Gomez moved into a nursing home shortly after the departure of Cuahquentzi, where he quickly developed the pneumonia that led to his death. He was buried Tuesday at the Abraham Lincoln National Cemetery in Elwood, Illinois.