A version of this story was first posted by member station WABE.
President Trump called former President Jimmy Carter for the first time this weekend.
Carter revealed that news during his regular Sunday school lesson at his home church, Maranatha Baptist Church in Plains, Georgia, on Sunday morning.
Earlier this year, Carter sent Trump a letter with some advice about managing the U.S.-China relationship. Carter oversaw the normalization of diplomatic relations between the two countries 40 years ago.
On Saturday evening, Trump called Carter to talk about it. It was the first time they'd spoken, Carter said. He said Trump told him that he is particularly concerned about how China is "getting ahead of us."
Carter said he agreed with Trump on this issue.
"And do you know why?" Carter said. "I normalized diplomatic relations with China in 1979. Since 1979, do you know how many times China has been at war with anybody? None. And we have stayed at war," he said. (China and Vietnam actually fought a brief border war in early 1979, weeks after U.S. relations with China were normalized.)
Carter said the United States is "the most warlike nation in the history of the world" due to a desire to impose American values on other countries, and he suggested that China is investing its resources into projects such as high-speed railroads instead of defense spending.
"How many miles of high-speed railroad do we have in this country?"
Zero, the congregation answered.
"We have wasted, I think, $3 trillion," Carter said, referring to American military spending. "China has not wasted a single penny on war, and that's why they're ahead of us. In almost every way.
"And I think the difference is if you take $3 trillion and put it in American infrastructure, you'd probably have $2 trillion left over. We'd have high-speed railroad. We'd have bridges that aren't collapsing. We'd have roads that are maintained properly. Our education system would be as good as that of, say, South Korea or Hong Kong.
"I wasn't comparing my country adversely to China," Carter qualified. "I was just pointing that out because I happened to get a phone call last night."
The former president said he understands that Trump is worried about China surpassing the U.S. as the world's top economic superpower.
"I don't really fear that time, but it bothers President Trump, and I don't know why. I'm not criticizing him — this morning," Carter said to laughs from the audience.
The White House confirmed the conversation in a statement released Monday.
"President Jimmy Carter wrote President Trump a beautiful letter about the current negotiations with China and on Saturday they had a very good telephone conversation about President Trump's stance on trade with China and numerous other topics," said the statement, which wasn't attributed to a spokesperson.
Much of Carter's Palm Sunday lesson was focused on peace and kindness and was given before an audience that was mostly composed of visitors, many of whom had lined up overnight for the service.
Last month, Carter became the nation's longest-living president.