Jamie Dimon said he could beat President Donald Trump in an election. Then he walked it back.

"I should not have said it," the JPMorgan Chase (JPM) CEO said in a statement. "I'm not running for President. Proves I wouldn't make a good politician. I get frustrated because I want all sides to come together to help solve big problems."

Earlier Wednesday, Dimon said he could take on the president and win. But he appeared to suggest he wouldn't survive the Democratic primaries.

"I think I could beat Trump," Dimon said at an event in New York on Wednesday, according to a transcript posted by CNBC. "I can't beat the liberal side of the Democratic Party."

He added: "I'm as tough as he is, I'm smarter than he is. I would be fine. He could punch me all he wants, it wouldn't work with me. I'd fight right back."

Dimon said that he used to believe a wealthy New Yorker couldn't be elected president, but ended up being "dead wrong."

"And by the way, this wealthy New Yorker actually earned his money," he said, referring to himself. "It wasn't a gift from Daddy."

JPMorgan confirmed the nature of the comments but said it did not have a transcript. The White House did not immediately respond to a request for comment.

Dimon is probably America's most influential bank CEO. He is the longest-serving chief executive on Wall Street and heads the powerful Business Roundtable, which promotes the interests of business in public policy.

Since the 2016 election, Dimon has weighed in frequently on trade, immigration and other issues.

He's been asked repeatedly whether he intends to run for president in 2020, but consistently demurs. He said earlier this year that he has agreed to lead JPMorgan until 2023.

Dimon said in an interview with CNNMoney in July that he may not agree with all of Trump's policies, but sees value in working with him.

"You can't take yourself off the playing field," he said at the time.