The U.S. economy grew at its fastest pace in nearly four years in the second quarter as consumers boosted spending and farmers rushed shipments of soybeans to China to beat retaliatory trade tariffs before they took effect in early July.

President Donald Trump, who ahead of Friday's release of the gross domestic product report had promoted the notion that second-quarter growth would be robust, declared victory.

"We have accomplished an economic turnaround of historic proportions," Trump told reporters. "These numbers are very, very sustainable."