Updated

Army Ranger Josh Hargis was unconscious, hooked to a breathing tube at a military hospital in Afghanistan after losing both his legs in battle last week.

But when the Purple Heart ceremony began at Hargis’ bedside, it turned out he was not unconscious, as doctors believed. Instead, he struggled with an attending doctor to raise his heavily bandaged hand to salute a commanding officer presenting him with the medal.

"I cannot impart on you the level of emotion that poured through the intensive care unit that day," the commander wrote to the Ranger's wife. "Grown men began to weep, and we were speechless at a gesture that speaks volumes about Josh's courage and character."

[pullquote]

There were about 50 fellow Rangers, doctors and nurses in the hospital room during the ceremony. The commanding officer said the salute was the “most beautiful” any person in the room had ever seen.

"I'm overwhelmed. I'm overwhelmed that that’s my boy, that he could come from me. Yeah, I'm overwhelmed," Jim Hargis, the 24-year-old's father, told Fox 19.

Hargis, who is expecting a baby with his wife, was injured in an explosion while his unit, the 3rd Ranger Battalion, was searching for a high-value target in Panjwaj, Afghanistan, the Fox 19 report said. Four other soldiers died in the attack.

His father told the station that the troops had just inspected a man for bombs, and then a woman came by and exploded. While the troops were responding to the explosion, other IEDs planted in the area detonated, including one Hargis stepped on.

Hargis will be moved to a military hospital in San Antonio, Texas, for further treatment.

Click for more from Fox19.com

WATCH: Army Capt. William Swenson receives Medal of Honor