Warren Buffett predicts the U.S. and China will avoid a serious trade conflict.

"I don't think either country will dig themselves into something that precipitates and continues any kind of real trade war," he said at the Berkshire Hathaway 2018 annual shareholder meeting Saturday. "There will be some back and forth, but in the end I don't think we'll come out with a terrible answer on it."

Buffett said it was difficult politically to advocate for free trade as many of the benefits are spread across the whole population, while the negative effects "are very apparent and painful" to parts of the country.

But he is optimistic the two economic powers will figure it out because the awful historic track record of previous trade wars.

"We've had that in the past a few times, I think we learned a general lesson on it," he said. "It's just too big and too obvious, the benefits are huge and the world's dependent on it in a major way for its progress that two intelligent countries will do something extremely foolish."