After a depressing first quarter, the U.S. economy beat expectations in the second quarter as gross domestic product rose 4 percent, the Commerce Department announced Wednesday.

According to the report, the economy grew as non-military government expenses were scaled back.

The Commerce Department reports on business orders for durable goods in July, on Monday, Aug. 26, 2013. (AP Photo)

The Commerce Department reported Wednesday that durable goods purchases spiked 14 percent in the second quarter of 2014, helping to drive a 4 percent increase in GDP. (AP)

Before the report’s release, economists generally expected a more modest GDP increase of around 3 percent, according to the Wall Street Journal.

Such an increase would have merely offset the disappointing first quarter of 2014, in which the economy contracted 2.1 percent; the new report now puts the economy in the black for the year, so to speak.

One of the main drivers of the economic rebound: the purchase of durable goods (things like cars and home appliances that are expected to last at least three years) jumped 14 percent in the second quarter.

As Americans spent more — total personal consumption expenditures rose 2.5 percent in the second quarter — and sold more goods and services to the rest of the world — exports rose 9.5 percent in the second quarter, after falling 9.2 percent in the first — the federal government apparently took a step back, according to the report.

Military spending rose slightly in the second quarter, after being slashed in the first, while non-defense dropped off.

From the report:

Real federal government consumption expenditures and gross investment decreased 0.8 percent in the second quarter, compared with a decrease of 0.1 percent in the first. National defense increased 1.1 percent, in contrast to a decrease of 4.0 percent. Nondefense decreased 3.7 percent, in contrast to an increase of 6.6 percent.

The news seemed good on Wednesday morning, but the Commerce Department’s report contained a major caveat that could lead to the 4 percent growth figure being trimmed down later.

From Zero Hedge:

What is interesting is that the Commerce Department announced that as a result of incomplete June data, the biggest components of the GDP beat, Inventories and Trade, were estimated. In other words, assume that future revisions of Q2 GDP will be lower, not higher, as the actual data comes in.

Follow Zach Noble (@thezachnoble) on Twitter