U.S. economic growth rebounded to a 2.6 percent annual growth rate in the second quarter, the Department of Commerce reported Friday in its report on gross domestic product.

Second-quarter growth was right in line with expectations, and well above the growth rate for the first quarter, which was revised down two-tenths of a percentage point to 1.2 percent on Friday. Greater consumer and government spending helped drive the improvement.

Federal Reserve officials and business economists have long expected that growth would pick back up in the second quarter after the weak first-quarter reading, as they see an underlying growth rate for the U.S. of around 2 percent.

President Trump has aimed for a sustained GDP growth rate of 3 percent, although his advisers have said that the country will only hit that mark when his preferred policies on taxes, regulations, and trade are put into effect.

Under President Obama, the economy never notched a 3 percent GDP growth rate in a calendar year, a fact that Republicans have frequently used to criticize the Democrat. On Friday, though, the Bureau of Economic Analysis released updates to past years' data that revealed that the economy was slightly better than previously thought. With the revisions, output growth came close to the 3 percent mark in 2015, hitting a 2.9 percent rate, rather than the 2.6 percent previously estimated.

The outlook for Trump's 3 percent pledge is still dicey. With Friday's report, the economy is "still traveling in the 2% 'slow lane' for the past 7 years," noted Stuart Hoffman, an economist for the PNC Financial Services Group. Hoffman projected that growth would clock in at around 2.5 percent for the rest of 2017, and remain at that rate in 2018 if Congress is successful in slashing tax rates.