WASHINGTON (Reuters) - U.S. President Donald Trump had a sharp rejoinder for Jamie Dimon on Thursday, saying the JPMorgan chief executive lacked the “smarts” to be president but was otherwise wonderful.

The Republican president, known for his acerbic insults on Twitter, was hitting back at Dimon for saying on Wednesday that he was smarter than Trump and could beat him in a White House race. Dimon quickly walked back those comments in a statement.

“The problem with banker Jamie Dimon running for President is that he doesn’t have the aptitude or “smarts” & is a poor public speaker & nervous mess - otherwise he is wonderful,” Trump wrote on Twitter.

Dimon, at an event promoting a $500 million JPMorgan investment in cities, had earlier said: “I think I could beat Trump ... because I’m as tough as he is, I’m smarter than he is,” according to CNBC. “I can’t beat the liberal side of the Democratic Party.”

“And by the way this wealthy New Yorker actually earned his money,” Dimon added. “It wasn’t a gift from Daddy.”

Trump has often referred to a $1 million loan he received from his father, a real estate magnate, to start his own business.

Dimon, 62, has said in the past he would not run for president and does not have the temperament for the job. He said in January he expects to be chief executive officer of JPMorgan Chase & Co JPM.N for about five years.

JPMorgan is the biggest bank in the United States by assets.