In 2015, former Vice President Joe Biden had everything lined up to jump into the Democratic primary for president. He had been laying the groundwork for a presidential campaign since 2013, retaining strategists from the Obama campaign, creating fundraising plans, and identifying staff in key states like Iowa, New Hampshire, and South Carolina.

Then he reconsidered, in large part due to his son’s death. But his new book, Promise Me, Dad: A Year of Hope, Hardship, and Purpose, makes it clear just how close Biden came to running in the primary that still divides the Democratic Party. There’s plenty of buzz building around the possibility that the 75-year-old Biden might run in the 2020 presidential race, which the former vice president hasn’t done a lot to quash. In interviews promoting his book, Biden made it clear he isn’t ruling out a future campaign and expressed some regret that he didn’t run in 2016.

"I'm not closing the door. I've been around too long," he told NBC's Today on Monday.

In the book, Biden writes that he believed he was uniquely qualified to continue Barack Obama’s legacy. That’s a veiled criticism of Hillary Clinton, who Biden says did not strike him as the right candidate for the moment. He writes that while “confident” and “determined,” Clinton also seemed to “not evince much joy at the prospect of running.”

“The voting public was tired of careful and carefully packaged candidates,” he added. “My reputation as a ‘gaffe machine’ was no longer looking like a weakness. The public could see that I spoke from the heart and I meant what I said.”

His son Beau Biden, losing his battle with an aggressive form of brain cancer, was one of his father’s biggest supporters. He urged Biden to run for president even as his prognosis dramatically worsened. “Beau believed, as I did, that I was prepared to take on the presidency,” Biden wrote. “That there was nobody better prepared.”

Biden writes that Beau’s death from brain cancer in May 2015 — and specifically, the fear that it could be politicized over the course of a campaign — made him reconsider a run.

Clinton viewed Biden as a serious challenge in 2016

Biden details a breakfast meeting with Clinton at the vice president’s residence in early 2015, after he had said publicly that he wouldn’t announce he was running for president until the summer or fall of that year. Not having publicly announced herself, Clinton was testing the waters. Biden writes:

She started off by telling me what a good vice president I had been, how much I had done for the country in my career, and how I had earned the right to run for president. Then she pretty much asked me straight up if I was going to jump in. I didn’t feel like I could tell her the truth about Beau. “I’m not in any position to make a decision now” was all I said, “and I think I’m going to wait.”

Biden says he believes Clinton wanted to hear him say he was not going to enter the race, but the two agreed that if they did run against each other, it would be a positive campaign focused on the issues.

Biden was well aware the dynamics of the primary would be challenging, with many in the Democratic Party coalescing around Clinton’s candidacy early in the race. Clinton was well-positioned from the start, and her early momentum made it easy for establishment Democrats to assume she’d win.

As Vox’s Ezra Klein argues, that actually gave Clinton’s Democratic challenger Bernie Sanders quite the opening. Sanders was an independent senator who didn’t owe the Democratic Party anything, and he was able to play this stark contrast to his advantage. But Clinton’s dominance hurt the chances of other potential candidates like Biden, Massachusetts Sen. Elizabeth Warren, or Colorado Gov. John Hickenlooper. Biden reflected on this in his book, recalling discussions he had about the primary field with former President Barack Obama:

In January 2015 the president was convinced I could not beat Hillary, and he worried that a long primary fight would split the party and leave the Democratic nominee vulnerable in the general election. More than anything, he did not want to see a Republican in the White House in 2017. I got it, and never took issue with him.

Promise Me, Dad is about Biden’s son — who was supposed to run

But the real subject of the book is the death of Biden’s son Beau. Promise Me, Dad covers the year 2015, when Biden was trying to make a decision about his political future, carry out his vice presidential duties during foreign policy crises in Ukraine and Iraq, cope with the loss of his son, and comfort his family.

As Biden writes in the beginning of the book, Beau, his oldest son, had dedicated himself to public service from a young age, and had clear political aspirations himself. At the time he became sick, he was serving as Delaware’s attorney general and had declared his intention to run for governor of the state.

“Beau Biden, at age forty-five, was Joe Biden 2.0.,” Biden wrote. “He had all the best of me, but with the bugs and flaws engineered out. I was pretty sure Beau could run for president some day and, with his brother’s help, he could win.”

In 2012, Biden was considering stepping out of the political limelight after President Obama’s second term came to an end, to dedicate more time and attention to his son’s political career. But all that changed when Beau was diagnosed with cancer in the summer of 2013. The younger Biden had a particularly aggressive brain tumor called a glioblastoma. After a surgery to try to remove the tumor, he initially kept working and looking ahead to the future, Biden writes:

He had no real control over what the disease or the treatment was doing to his body; no real control over his blood work; no real control over what his scans looked like every two months; no real control over when and how aggressively his tumor might begin to grow again. What he could control, he did. He kept doing his job as attorney general of Delaware, and doing it well.

However, Beau’s disease rapidly worsened in 2015, robbing him of some motor functions and his speech. After a last-ditch effort to inject him with a live virus to attack the cancer cells in his brain briefly appeared to be helping him improve, Biden deteriorated suddenly and died at Walter Reed Memorial Hospital in late May.

“‘May 30. 7:51 p.m. It happened,’ I recorded in my diary,” Biden wrote. “‘My God, my boy. My beautiful boy.’”