“We were told he was — he was going to die within minutes or … an hour,” the president, 79, said, recalling the end of Beau’s diagnosis with brain cancer, which killed him in 2015 when he was 46. “He looked at me, and he said, ‘Dad, promise me, promise me, Dad, you’re going to stay involved.’ I said, ‘I’ll be involved. I’ll be — I’ll be good, Beau.’ “

“He said, ‘No, dad, promise me,’ ” Biden continued. ” ‘Give me your word as a Biden that you’re going to stay engaged.’ “

The president said his son made him promise “because he knew, like a lot of you — what you’ve been through — the first instinct is you just want to curl up in a ball and just leave, no longer do what you’ve done your whole life.”

The president, speaking at the National Prayer Breakfast in Washington, D.C., told the audience of lawmakers he told his son, “I give my word.”

Their conversation, which took place at Walter Reed National Military Medical Center, also included Beau’s “closest friend,” his younger brother, Hunter Biden.

“We were all three on the bed,” Biden said. “And he turned to me and he said, ‘Dad, I want you to know I’m not afraid.’ “

As a member of the Delaware Army National Guard and as a major in the Judge Advocate General Corps, Beau was deployed to Iraq in 2008 and served in active duty overseas until late 2009.

The title of Biden’s 2017 memoirPromise Me, Dad, also touches on conversations between father and son during Beau’s final days.

The bittersweet recollection of his time with Beau comes a day after the Biden administration reignited a “Cancer Moonshot,” aiming to reduce deaths from the disease by half in the next 25 years and to make life after a cancer diagnosis more bearable for patients and their families.

At the prayer breakfast on Thursday, the president said he was fortunate despite the grief he has experienced from losing a son as well as his first wife and baby daughter, who died in a Christmastime car accident shortly after he was elected as a senator in 1972.

We’ve all gone through really difficult times — every one of you out there — one way or another,” Biden said. “And I had an overwhelming advantage, and I mean it sincerely: I had a family that was there for me every single, solitary moment.”

He pointed out that is not true for everyone, especially during a pandemic that has killed nearly 900,000 Americans.

“Think of all the people you know, whether they’re constituents or friends or relatives, who get up every morning, don’t have anybody … and they put one foot in front of the other, and they do it,” he said. “They lost a child, they lost a mother, a father, a husband, someone close to them — just plucked away — and they get up every single day and put one foot in front of the other. And they’re the people who deserve our recognition and our credit.”