President Biden accidentally revealed a previously unknown detail about former President Carter’s health toward the end of a speech Monday evening, before admitting he "should not have said that." 

Carter, whose health is waning and has been placed on hospice care at his home, instructed Biden to deliver his eulogy, the president revealed during a Democratic National Committee fundraiser in Rancho Santa Fe, California. 

"He asked me to do his eulogy – excuse me I shouldn’t say that," Biden remarked. "I spent time with Jimmy Carter and it’s finally caught up with him. But they found a way to keep him going for a lot longer than they anticipated because they found a breakthrough."

He also implied the former president’s cancer had returned. These remarks were not recorded as video was not allowed.

JOE BIDEN 2024? AMERICANS SOUND OFF ON THE NEED FOR A DEMOCRATIC CHALLENGER

Joe Biden, Jimmy Carter

Joe Biden and former President Carter at the Pepsi Center on Aug. 26, 2008, in Denver. (Justin Sullivan/Getty Images)

The comments came as Biden was discussing breakthroughs in cancer treatment and urging the dozens of people in the room to increase funding for the Advanced Research Projects Agency for Health (ARPA-H), an initiative Biden created last year to improve the government’s ability to speed biomedical and health research.

Last year, Biden introduced ARPA-H as an initiative that "will pursue ideas that break the mold on how we normally support fundamental research and commercial products in this country."

It would pursue "ideas so bold no one else, not even the private sector, is willing to give them a chance or to sink a lot of money into trying to solve," he said at the time, according to its website. 

Carter and Biden laughing

Presidential candidate Jimmy Carter accepts the support of Sen. Joseph Biden, D-Del, at a news conference in the Sheraton Hotel in Madison. (Getty Images)

Jimmy Carter, Joe Biden

Sen. Joseph Biden points out a friend in the crowd at the Padua Academy to President Carter during a fundraiser. (Getty Images)

On Monday, Biden also commented on the state of democracy in the U.S. and the results of the 2022 midterm elections.

"I think the American public has moved to a place where they're genuinely worried about our democracy," Biden said, saying it was "not a joke. It's not hyperbole."

TED CRUZ SAYS BIDEN 'CERTAINLY' ISN'T RUNNING THE WHITE HOUSE AFTER NEW BUDGET PROPOSAL SHOWS PRIORITIES

He pointed out the polarization in cable news, saying "people tune in to what they want to hear." 

"If you're a moderate to liberal, you want to look at an MSNBC, that's what you watch on cable, conservatives turn to Fox News," Biden said.

The president then transitioned to cooperation and said his administration has worked with congressional Republicans and would continue to do so with the Republican majority in the House of Representatives.

"We were told we couldn’t pass anything in a bipartisan way, but guess what? We passed more major bipartisan legislation than anybody has in the recent past," he said.

Biden and Carter previously worked together when Carter was president. At the time, Biden was a U.S. senator. The two also helped one another's respective campaigns.

Biden and Rishi Sunak

President Biden and British Prime Minister Rishi Sunak participate during the AUKUS summit on March 13, 2023, in San Diego. (Leon Neal/Getty Images)

Earlier in the day, Biden flew to San Diego and appeared alongside Australian Prime Minister Anthony Albanese and British Prime Minister Rishi Sunak for an AUKUS summit – an acronym for Australia, the United Kingdom and the United States.

NORTH KOREA LAUNCHES MULTIPLE BALLISTIC MISSILES INTO SEA AS SOUTH KOREA WARNS OF 'GRAVE PROVOCATION'

He gave an address outdoors at Naval Base Point Loma in San Diego, where he was flanked by two submarines, USS Missouri and USS Charlotte, which were tied up at the pier behind him. 

The world leaders speaking

Australian Prime Minister Anthony Albanese, left, President Biden and British Prime Minister Rishi Sunak, right, at a press conference during the AUKUS summit on March 13, 2023, in San Diego. (Leon Neal/Getty Images)

During his speech, Biden jokingly asked if, as president, he could instruct the sailors on the Missouri to be at ease. The incident sparked some conversation on social media.

The president went on to say the trilateral partnership would enable Australia access to nuclear-powered submarines, which are "nuclear-powered, not nuclear-armed," he clarified.

"These boats will not have any nuclear weapons of any kind of them," the president said.

CLICK HERE TO GET THE FOX NEWS APP

The three flags of the US, UK and Australia

President Biden hosts British Prime Minister Rishi Sunak and Australian Prime Minister Anthony Albanese in San Diego for an AUKUS meeting. (Leon Neal/Getty Images)

Sunak later called AUKUS "the most significant multilateral defense partnership in generations."

Fox News' Aliah Walls contributed to this report