WASHINGTON — In the middle of a pitched battle in Iraq came a request for help: Members of Staff Sgt. David Bellavia’s platoon of soldiers were pinned down in a dark house under intense close-range machine-gun fire.

Bellavia stepped into a doorway under fire and squeezed the trigger of his belt-fed M249 automatic weapon until it ran dry of ammunition. The Americans, including Bellavia, retreated from the room successfully. But that was just the beginning of Bellavia’s valor on Nov. 10, 2004, according to Army accounts of the battle and those of veterans who served with him.

On Tuesday at the White House, Bellavia, 43, of Lyndonville, New York, became the first living U.S. veteran or service member to receive the Medal of Honor for actions in the nearly nine-year Iraq War that began with the 2003 U.S. invasion.

Bellavia is credited with not only braving enemy fire to free his fellow soldiers from a kill zone but also reentering the house in Fallujah to fight and kill other insurgents, including one in hand-to-hand combat with a knife.

“David took over,” Trump said Tuesday. “He provided suppressive fire while his men evacuated, rescuing his entire squad at the risk of his own life. Only when his men were all out did David exit the building. But the fighting was far from over.”

Retired 1st Sgt. Colin Fitts, one of the soldiers pinned down in the house, said “were it not for David Bellavia, I wouldn’t be sitting here today.”

Bellavia, who previously received the Silver Star for his actions, was fighting in Operation Phantom Fury, in which more than 10,000 U.S. troops took back what had once been a city of more than 350,000 people from about 4,000 deeply entrenched insurgents. The intense urban clash, commonly known as the Second Battle of Fallujah, included scores of gunbattles in house-to-house fighting.

Bellavia is among a group of service members whose valor awards have been upgraded after a review launched by former Defense Secretary Ash Carter in 2016 of valor awards from the wars in Iraq and Afghanistan. In March, Army Staff Sgt. Travis Atkins posthumously received the Medal of Honor following the same review for smothering a grenade in Iraq in 2007 to save the lives of fellow soldiers. More than 100 awards have been upgraded.

In the latter half of the battle, Bellavia reentered the house in Fallujah after a U.S. Bradley Fighting Vehicle pounded it with 25 mm cannon fire, with other soldiers covering him. The building was filling with noxious water after the plumbing was destroyed by gunfire from the Bradley Fighting Vehicle, but insurgents inside were still alive.

Bellavia pursued them, he said, because they had a rocket-propelled grenade launcher that could have killed numerous U.S. troops.

At one point, an insurgent burst out of a wardrobe, and Bellavia shot him multiple times, according to an Army account of the battle. When the enemy fighter began running away, Bellavia followed his blood trail upstairs to the second floor, slipping in the blood. He threw a grenade into the room where he was hiding. The two men then grappled in hand-to-hand combat, with Bellavia killing the insurgent with a knife, according to Bellavia’s Silver Star citation.

“I walked into situations that were happening in real time, and I just had to react to it,” Bellavia said. “And that’s exactly what I did.”

Col. Douglas Walter, Bellavia’s former company commander, said he nominated Bellavia for the Medal of Honor early in 2005. Walter knew that senior military officials would scrutinize his recommendation, and “initially we weren’t sure what happened to it.”

Bellavia said President Trump notified him late last year that he had been approved for an upgrade to the Medal of Honor.

The Associated Press contributed.