At a White House event Monday morning, President Obama praised Secretary of Defense Chuck Hagel, who had earlier submitted his resignation under pressure.

"Over nearly two years, Chuck has been an exemplary defense secretary," Obama said of Hagel, a Republican former senator and Vietnam veteran.

"We come from different parties, but in accepting this position you sent a powerful message," Obama said, flanked by both Hagel and Vice President Joe Biden. "When caring about national security and our troops and their families, we are all Americans first."

Obama thanked the outgoing defense secretary for his candor. "You’ve always given it to me straight, and for that I will always be grateful.”

An emotional Hagel said that serving as Secretary of Defense had "been the greatest privilege of my life."

"I will continue to support you, Mr. President, and the men and women who serve this country every day," Hagel said. He repeatedly thanked Obama and Biden, who somberly stood next to him as he spoke.

Obama said he spoke with Hagel last month and Hagel determined that it would be an “appropriate time for him to complete his service.”

"This decision does not come easily to him," Obama said.

Obama praised Hagel for modernizing alliances in the Asia-Pacific region, strengthening the NATO alliance, helping to improve security at military installations, managing the war in Afghanistan and the drawdown of troops and confronting the Islamic State and Ebola.Obama also said Hagel was able to launch new reforms in the face of tight budgets.

Hagel will stay on as secretary until Obama picks a successor, who must be confirmed by the Senate. Possible contenders include Michele Flournoy and Ashton Carter, former high-ranking defense officials during Obama’s first term who were passed over for the top job in favor of Hagel two years ago.

Obama recounted a visit by Hagel to Korea last year, when a soldier asked Hagel about his favorite college football team, a question Obama said many troops may have been reluctant to ask former secretaries of defense. Hagel, a Nebraska native, said he has no choice but to root for the University of Nebraska Cornhuskers.

"He understands our men and women like few others because he's stood where they've stood. He's been in the dirt," Obama said. "He sees himself in them and they see themselves in him."