WASHINGTON — President Trump on Monday awarded the nation’s highest military honor to a former Green Beret who was greeted with such a loud ovation at the White House that the president quipped, “I wish I was that popular.”

Ex-Staff Sgt. Ronald Shurer II earned the Medal of Honor for his actions on April 6, 2008, in the Shok Valley of Afghanistan, where his team faced sniper fire, rocket-propelled grenades and a hail of bullets.

Shurer fended off the enemy attack for several hours while saving the lives of wounded teammates.

“For more than six hours, Ron bravely faced down the enemy,” Trump said at a White House ceremony. “Not a single American died in that brutal battle thanks in great measure to Ron’s heroic actions.”

Shurer, 39, is from Puyallup, Washington, and is a graduate of Washington State University. After the Sept. 11, 2001, terrorist attacks, he was inspired to serve in the military, just like his parents, grandfather and great-grandfather.

Following two deployments to Afghanistan, Shurer joined the Secret Service and in 2014 was assigned to its Counter Assault Team at the White House, which aims to stop any coordinated attack on the president.

The former Green Beret lives in Virginia with his wife, Miranda, and two sons, Cameron and Tyler.

“We stand in awe of your father’s courage,” Trump told Shurer’s kids. “Today he joins the world’s most elite gathering of heroes.”

Shurer received a prolonged standing ovation at the White House ceremony, where Trump quipped, “I wish I was that popular.”

Shurer is currently battling cancer with the same bravery he displayed on the battlefield, Trump said.

“He’s been fighting it every single day with courage and strength. He’s a warrior,” Trump said. “… Ron is an inspiration to everyone in this room and to every citizen all across our great land.”