Defense Secretary Chuck Hagel apologized Wednesday to a former US soldier for having to wait years before his valor was recognized with the Medal of Honor.

"Mistakes were made in his case," Hagel said during a Pentagon ceremony honoring William Swenson, 34, a retired US Army captain given the military's highest decoration this week.

Swenson was nominated for the medal in 2009 for his role in a harrowing battle in eastern Afghanistan, but his nomination papers were "lost" by Army officials.

His supporters suspected commanders tried to deny him the honor because he had complained about his superiors failing to provide air and artillery support during the battle.

But his papers were resubmitted in 2011 and he was awarded the Medal of Honor by President Barack Obama on Tuesday.

"We're sorry that you and your family had to endure through that, but you did and you handled it right," Hagel said.

It was the first time such a senior official publicly apologized over the episode.

The Pentagon chief said Swenson proved his courage in the battle but also afterward by daring to question the Army.

"He questioned -- he dared to question the institution that he was faithful to and loyal to," Hagel said.

"Now, that's courage and that's integrity and that's character."

US Army officials eventually rectified the mistake, Hagel said.

"They went back and acknowledged a mistake was made and they fixed it."

He said Swenson represented "all the good things about our country," including the ability to "self-correct" when mistakes are made.

Hagel, a decorated Vietnam War veteran, did not refer specifically to the circumstances of the 2009 battle, when Swenson repeatedly called for air and artillery support while his unit was pinned down by Taliban militants.

The request for artillery fire was denied and attack helicopters did not arrive for more than an hour.

In a military probe after the battle, Swenson complained bitterly to investigators about the failure to quickly provide back-up to the outnumbered US and Afghan forces.

Two officers were later disciplined as a result of the investigation.

Another American present at the battle, former corporal Dakota Meyer, whose description of the events differs from Swenson's, received the Medal of Honor in September 2011.

A California lawmaker, Duncan Hunter, took up Swenson's case and pushed for the Pentagon to award him the Medal of Honor.

"Secretary Hagel believes that presentation of the Medal of Honor to Captain Swenson is long overdue, and he appreciates the efforts of those in the Department and in Congress who worked to ensure that his heroism was appropriately recognized," Pentagon press secretary George Little said.

Swenson is the first Army officer to receive the medal since the Vietnam War.

The citation praises Swenson for risking his life several times to rescue wounded American and Afghan soldiers and to retrieve the bodies of fallen comrades.

A video from a helicopter recently released shows Swenson loading his wounded sergeant onto the chopper and then leaning down to kiss him on the head.