WASHINGTON — U.S. President Barack Obama on Monday awarded former Army Staff Sgt. Clinton Romesha the Medal of Honor, the highest U.S. award for valor in combat, for leading a few dozen soldiers to fight off an attack by hundreds of Taliban insurgents in Afghanistan.

Obama placed the blue-and-white decoration around Romesha’s neck at a White House ceremony. Romesha, 31, of Minot, N.D., is the fourth living service member to receive the Medal of Honor for action in Afghanistan or Iraq.

“I called Clint to tell him that he would receive this medal,” Obama said at the ceremony. “He said he was honored, but he also said, ‘It wasn’t just me, it was a team effort.’”

Romesha, a 4thInfantry Division section leader, rallied 53 U.S. soldiers to fight off about 300 heavily armed Taliban insurgents on Oct. 3, 2009, at Combat Outpost Keating, isolated in a rugged part of eastern Afghanistan, according to his medal citation.

Story continues below advertisement.

The battle killed eight U.S. soldiers and wounded 22.

Insurgents armed with mortars, rocket-propelled grenades and anti-aircraft guns attacked the outpost at dawn from four sides, the citation said. They overran much of the base and set it on fire.

Awakened by the attack, Romesha moved under intense enemy fire to reconnoiter and seek reinforcements before returning to action with the support of an assistant gunner, the citation said.

Using a machine gun, Romesha wiped out a Taliban machine gun team. While firing on a second team, a rocket-propelled grenade smashed into the generator he was using for cover and shrapnel wounded him in the neck, hip and arm.

When another soldier arrived to aid him and the assistant gunner, Romesha again “rushed through the exposed avenue to assemble additional soldiers,” the citation said.

Romesha then gathered together a five-man team and returned to the fight, this time armed with a sniper rifle.

He shot dead three Taliban fighters who had breached the outpost’s wire, the citation said. He called in airstrikes that killed more than 30 insurgents, then he and his team provided covering fire that let three wounded soldiers reach the aid station. He and his men also moved 100 meters under heavy fire to recover the bodies of dead soldiers, the citation said.

After the ceremony, an emotional Romesha, who left the Army in 2011, told reporters he had accepted the award on behalf of those he fought with at Keating and was “conflicted” about it.

“The joy comes from recognition for us doing our jobs as soldiers on distant battlefields, but it’s countered by the constant reminder of the loss of our battle buddies, my battle buddies, my soldiers, my friends,” Romesha said, his hands shaking as he read a statement.

Nine Silver Stars and 18 Bronze Stars were awarded for the Keating fight. It was the subject of the book “The Outpost: An Untold Story of American Valor,” by CNN reporter Jake Tapper.