Updated Monday at 2:17 p.m.

President Donald 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 former President Carter sent President Trump a letter with some advice about managing the U.S.-China relationship. Carter oversaw the normalization of diplomatic relations between the countries 40 years ago.

And on Saturday evening, Trump called Carter to talk about it. It was the first time they’d spoken, Carter said. He said Trump said he is particularly concerned about how China is “getting ahead of us.”

Carter agreed that’s true.

“And do you know why? 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.

The U.S., Carter said, has been at war for all but 16 years of its 242-year history. (China and Vietnam actually fought a brief border war in early 1979, weeks after normalization of U.S.-China relations.)

He called the United States “the most warlike nation in the history of the world,” because of a tendency to try to force others to “adopt our American principles.”

Carter suggested that instead of war, China has been investing in its own infrastructure, mentioning that China has 18,000 miles of high-speed railroad.

“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 of American military spending. “… It’s more than you can imagine. 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 leftover. 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.”

He said he understood 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,” the statement said.

Much of Carter’s Palm Sunday lesson went beyond politics, to focus on the importance of bringing virtues like peace and kindness to today’s world, and how, he said, God has given each person the freedom and the power to change their own life.

He spoke to a congregation of mostly visitors, many of whom had arrived overnight to get in line for the service. That’s become commonplace for his biweekly Sunday School lessons.

Last month Carter became the nation’s longest-living president.