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.

Gross domestic product increased at a 4.1 percent annualized rate also as government spending picked up, the Commerce Department said in its snapshot of second-quarter GDP on Friday. That was strongest performance since the third quarter of 2014.

January-March quarter GDP growth was revised up to a 2.2 percent pace from the previously reported 2.0 percent rate to account for new source information and methodology improvements.

Compared to the second quarter of 2017, the economy grew 2.8 percent. Output expanded 3.1 percent in the first half of 2018, putting the economy on track to achieve the Trump administration’s target of 3 percent annual growth.

Read more in Reuters.