Former president Jimmy Carter expressed doubt Tuesday night that he would have been able to handle the presidency at age 80, saying the job requires being “very flexible with your mind” and suggesting that there should be an age limit.

Carter did not mention any of the current presidential candidates in his comments, but two leading Democratic contenders — former vice president Joe Biden and Sen. Bernie Sanders (I-Vt.) — would turn 80 while in office if elected.

Question’s about Biden’s age and mental acuity, in particular, have become part of the conversation in the Democratic nominating process. He is currently 76, while Sanders is 78.

Carter, who turns 95 next month, was asked during an event at the Carter Center in Atlanta what it would take for him to run for president again. The questioner noted that Grover Cleveland had served two nonconsecutive terms in the late 19th century.

“I hope there’s an age limit,” Carter said with a big grin as he sat next to his wife, Rosalynn Carter.

“You know, if I were just 80 years old, if I was 15 years younger, I don’t believe I could undertake the duties that I experienced when I was president,” he said. “For one thing, you have to be very flexible with your mind. You have to be able to go from one subject to another and concentrate on each one adequately and then put them all together in a comprehensive way.”

Carter added that presidents “also have to adopt new ideas.”

“The things I faced just in foreign affairs, I don’t think I could undertake them if I was 80 years old,” he continued. “So 95 is out of the question. I’m having a hard time walking. I think the time has passed for me to be involved actively in politics, much less run for president.”

Carter, who said he voted for Sanders in Georgia’s 2016 Democratic primary, replied to a separate question by saying he is keeping “an open mind” about the current crop of Democrats.

“One of the major factors I will have in my mind is who can beat Trump,” he said, referring to the current president, who is 73.

Earlier Tuesday, Trump’s campaign released a video that strung together several of Biden’s recent verbal gaffes and included clips of political commentators questioning whether he remained as mentally sharp as he once was.

During Tuesday night’s event, Rosalynn Carter also took aim at Trump.

“I think we need a new president,” the former first lady said. “I am so disturbed about white power. He says he is not a racist and maybe he is not. But some of the things he says encourages racism.”

Discover something new:

We’ve curated these stories to inspire your curiosity.

In the 1960s, this Florida coast line was a boomtown thriving on the race to the moon. Now, private investment in space travel might bring that back.

In consumer products, the best predictor of whiteness was whether someone owned a pet — followed closely by whether they owned a flashlight.

Developers are starting to focus on smaller entry-level houses, good news for prospective buyers. But it could also signal a negative outlook on the economy.