(Victoria Walker/The Washington Post)

President Obama awarded the nation’s highest civilian honor, the Presidential Medal of Freedom, to a shocked Vice President Biden on Thursday at the White House.

Biden and the president had gathered with others for what the White House had described as a final tribute to the vice president.

The event began with a playful and heartfelt tribute from Obama to one of his closest friends and confidants in Washington. As he finished his remarks, the president asked one of his military aides to come to the stage.

“For the final time as president I am pleased to award our nation’s highest civilian honor . . .” Obama began as a Marine officer bearing the medal stood by.

(Victoria Walker/The Washington Post)

Biden immediately spun around, turning his back to the crowd, and wiped his face and eyes with his handkerchief. The president bestowed the medal “with distinction,” an additional level of veneration that his three immediate predecessors had reserved for only three others — Pope John Paul II, former president Ronald Reagan and Gen. Colin Powell.

“I had no inkling,” Biden said after the medal was draped around his neck. “I thought we were going . . . to toast one another and say what an incredible journey it has been.”

In his remarks, Biden praised Obama for serving the nation with dignity and insisted that he was not worthy of the honor.

“I don’t deserve this,” the vice president said repeatedly.

Obama described Biden as a “lion of American history” and praised his long service in the Senate. As vice president, Biden’s influence has spanned both domestic and international policy initiatives. He was a critical voice in crafting strategy in the wars in Iraq and Afghanistan and in encouraging Obama to send Navy SEALs on a mission to capture or kill Osama bin Laden in 2011.

Biden also helped oversee the president’s first-term economic stimulus package and pressed unsuccessfully for gun-control legislation after the killing of 20 children at Sandy Hook Elementary School in Newtown, Conn.

Obama embraced a common Biden tactic in his remarks by including a quote from an Irish poet and words of wisdom from the vice president’s parents.

The president also spoke of their friendship forged through tough times and tragedy. In 2015, Beau Biden, the vice president’s son, died of brain cancer, and Obama delivered the eulogy at his funeral. Biden’s first wife and daughter were killed in a 1972 car crash shortly after he was first elected to the Senate. That tragedy has been a key feature of Biden’s political identity, and much of Obama’s remarks focused on the vice president’s compassion for his fellow Americans.

“When Joe talks about hope and opportunity for our children, we hear the father who rode the rails home there every night so he could be there to tuck his kids into bed,” Obama said. “When Joe talks to Gold Star families who have lost a hero, we hear a kindred spirit, another father of an American veteran, somebody whose faith has been tested and has been forced to wander through the darkness himself and who knows who to lean on to find the light.”

Biden recounted that Obama offered help when Biden’s son was battling cancer and the vice president was weighing whether to sell his house to cover the bills.

“I’ll give you the money,” Biden recalled Obama telling him. “Promise me. Promise me you won’t sell that house.”

Biden said that he and Obama had on occasion differed on matters of policy but that he had never doubted Obama’s judgment.

“I just hope that the asterisk in history that is attached to my name when they talk about this presidency is that I can say I was part of the journey of a remarkable man who did remarkable things for this country,” Biden said.

Biden closed by grabbing the medal, which had been draped around his neck, and lifting it off his chest. “This honor is not only well beyond what I deserve but it is a reflection of the extent and generosity of your spirit,” he said, turning to the president. “I don’t deserve this, but I know it came from the president’s heart.”