When Barack Obama arrived in Washington in 2005, the freshman senator from Illinois took his place in the very last seat on the far end of the dais of the Foreign Relations Committee. He was the most junior Democrat on a panel on which Joe Biden had served as chairman or ranking Democrat for more than a decade. The men were a generation apart, at least.
Biden, who entered the Senate when Obama was in junior high school, saw in Obama a fast learner but still viewed him mostly as an understudy.
The roles reversed when the upstart Obama captured the prize that Biden has coveted much of his professional life and invited the elder statesman to be a partner in his presidency.
By the end of their two terms in the White House, President Obama and Vice President Biden had forged a professional relationship and a personal bond that is deeper and stronger than any president and vice president in the modern era. They have agreed on almost every major policy issue in their eight years together, and when there has been disagreement, they managed to keep their disputes quietly behind the scenes.
Biden, notorious for speaking too much and revealing too much, has made his share of mistakes in that regard, but most were in the Washington tradition of telling the truth at the inappropriate time - such as his 2012 embrace of gay marriage before Obama made his own similar announcement. The vice president chafed at the way some of Obama's senior advisers threw their support behind Hillary Clinton's 2016 presidential campaign long before Biden made his own decision, and someone even leaked that during the 2012 reelection campaign, advisers polled whether replacing Biden with Clinton would give Obama a boost.
But the president never considered abandoning Biden, and throughout the 2016 primary campaign, he stayed publicly neutral. When it came time in October 2015 for Biden to announce that his days of running for office were done, Obama stood at his side in the Rose Garden. The president knew he was supporting a friend who was giving up on a lifelong dream of winning the presidency.
The distance they have traveled together can perhaps be best illustrated by two moments, eight years apart.
In February 2007, Biden announced his bid for the 2008 presidential nomination in a race that already included Clinton and Obama, prompting Biden to praise Obama as a rising star but in a manner that made clear he considered himself the wiser elder statesman. Biden fumbled his way through that backhanded compliment and walked into a racial quagmire.
"You got the first mainstream African American who is articulate and bright and clean and a nice-looking guy," Biden said at the time. "I mean, that's a storybook, man."
In early 2015, during one of their weekly lunch meetings, Biden explained the financial pressures his son's battle with brain cancer had created. He told Obama he was considering selling the family home outside Wilmington, Del., where he'd raised his children, to financially care for Beau Biden's family.
"Don't sell that house. Promise me you won't sell the house," Obama told Biden, according to the vice president's account in a CNN interview. "I'll give you the money. Whatever you need, I'll give you the money. Don't, Joe."
Biden did not need the loan, but a few months later his son lost his fight with cancer. Biden asked Obama to deliver Beau Biden's eulogy.
"To Joe and Jill: Just like everybody else here, Michelle and I thank God you are in our lives. Taking this ride with you is one of the great pleasures of our lives. Joe, you are my brother," Obama said, looking down directly at the vice president and his wife, Jill Biden.
Their backgrounds and personalities couldn't be more different. Obama is cerebral and disdains drama, while Biden is all heart and emotion and prone to theatrics in his own decision-making.
It is not the usual course of events for a president and vice president to remain close by the end of their service together. By 2008, Dick Cheney had grown resentful at how often he had been outflanked by other advisers to President George W. Bush. In 2000, Al Gore ran a presidential campaign that refused to use Bill Clinton because of Clinton's personal scandals.
Before them, Dan Quayle was never considered part of the innermost circle in George H.W. Bush's administration, and Bush himself felt like an outsider while serving as Ronald Reagan's vice president in the 1980s.
But Obama and Biden are viewed as so close that, in their last weeks in office, they even became a viral social media sensation after Republican Donald Trump's stunning victory over the presidential race. People posted pictures of the two men together, sometimes hugging, sometimes holding hands, with parodied captions, all with the theme of Biden wanting to play tricks on Trump - such as stealing all the T's on West Wing keyboards. In the memes, Obama serves as the mature foil to his prankster friend.
The two families have also connected in a way that might lead them into the same social circles after they leave the White House. Obama's two daughters have attended Sidwell Friends School in Northwest Washington, where three of Biden's grandchildren have gone to school. Sasha Obama, the president's younger daughter, is in the same class as Maisy Biden, and the two are friendly enough that the vice president took them along on the delegation that attended the women's World Cup soccer championship in Canada in 2015.
Biden has lost plenty of his own internal West Wing policy battles, but he has declared that he will not write a tell-all book about those years together and instead might pen a more personal account of his family's journey.
Obama has made clear that his affection for his older partner will likely continue well past their time in the White House.