In this June 19, 2018 photo, several ship to shore cranes stack shipping containers on-board the container ship Maersk Semarang while three Ever Green Line refrigerated containers wait to be loaded onto another ship at the Port of Savannah in Savannah, Ga. On Wednesday, Aug. 29, the Commerce Department issues the second of three estimates of how the U.S. economy performed in the April-June quarter. (AP Photo/Stephen B. Morton)

In this June 19, 2018 photo, several ship to shore cranes stack shipping containers on-board the container ship Maersk Semarang while three Ever Green Line refrigerated containers wait to be loaded onto another ship at the Port of Savannah in Savannah, Ga. On Wednesday, Aug. 29, the Commerce Department issues the second of three estimates of how the U.S. economy performed in the April-June quarter. (AP Photo/Stephen B. Morton)

WASHINGTON (AP) — The U.S. economy grew at a strong 4.2 percent annual rate in the April-June quarter, the best showing in nearly four years, as growth stayed on track to produce its strongest full-year gain in more than a decade. Strength in business investment offset slightly slower consumer spending.

The Commerce Department on Wednesday revised up its growth estimate for last quarter from an initial estimate of a 4.1 percent annual rate. The second quarter marked a sharp improvement from a 2.2 percent gain in the January-March period, though some of the strength last quarter came from temporary factors, including a surge in U.S exports before tariffs were to take effect.

ADVERTISEMENT

Economists expect growth to slow to a still solid 3 percent annual rate the rest of the year, resulting in full-year growth of 3 percent for 2018. It would be the best performance since 2005, two years before the Great Recession began.

The 4.2 percent annual growth that the government estimated for last quarter is the strongest such figure since a 4.3 percent annual gain in the third quarter of 2014. The expectation of 3 percent growth for 2018 as a whole would be up from gains of 1.6 percent in 2016 and 2.2 percent last year.

Since the recovery began in mid-2009, growth has been sub-par, with annual gains averaging just 2.2 percent, making it the weakest recovery in the post-war period.

President Donald Trump often pointed to that fact during the 2016 presidential campaign to attack the economic record of the Obama administration. He has touted the pickup in growth, as measured by the gross domestic product, as evidence that his economic program of tax cuts, deregulation and tougher enforcement of trade agreements is working. Last month, Trump proclaimed that the GDP figure showed that the United States was now the “economy envy of the world.”

While forecasting solid growth of around 3 percent this year, economists contend that this performance is being pumped up for now by the $1.5 trillion tax cut Trump pushed through Congress last year, along with increased government spending. Many analysts say they think that those factors will begin to fade starting next year and that by 2020, growth may even slow enough to edge the economy close to a possible recession.

Gus Faucher, chief economist at PNC, said he foresees GDP growth this year of 3.4 percent, which he thinks will slow to 2.4 percent in 2019 and 1.6 percent in 2020 “as the fiscal stimulus from tax cuts and spending fades.”

ADVERTISEMENT

Faucher said he thinks that continued interest rate hikes by the Federal Reserve will also act to slow growth. Trump has recently criticized the Fed, saying he is “unhappy” with its rate hikes, arguing that they pose a threat to the faster growth he is trying to fuel with his economic policies.

Some economists said Wednesday’s upward revision to GDP would give the Fed, which has already raised rates twice this year, leeway to do so twice more before year’s end, as it has signaled it expects to do.

“The economy’s good fortune is giving Fed officials the green light to take away the emergency stimulus left over from the recession and financial crisis a decade ago,” said Chris Rupkey, chief financial economist at MUFG Union Bank.

Trump administration officials reject outside forecasts that growth will inevitably slow after this year. They suggest that the Trump policies will unleash an economic boom that will deliver annual growth rates of 3 percent or better over the next decade.

Treasury Secretary Steven Mnuchin, in a CNBC interview Tuesday, pointed to the solid GDP performance in the spring as evidence that the administration is fulfilling Trump’s campaign promises regarding the economy.

“We are delivering on what was the president’s economic agenda about creating growth,” Mnuchin said.

Wednesday’s GDP report showed that consumer spending, which accounts for about 70 percent of economic activity, expanded at a strong annual rate of 3.8 percent in the second quarter, down slightly from an initial estimate of 4 percent growth in consumer spending. But that downward revision was outweighed by other factors including stronger business investment, which grew at a 6.2 percent rate, driven by spending on such items as computer software.

Other sources of strength were less growth in imports, which subtract from GDP, and faster growth in government spending at the federal and state and local levels.