New York (CNN Business) The US economy grew at a much better than expected rate in the first quarter, the Commerce Department reported Friday. The top-line number is a pleasant surprise in a quarter marked by a government shutdown, severe weather, Boeing's troubles with the 737 Max, fears of an escalating trade war and the gradual fading of fiscal stimulus from tax cuts.

But digging into the details of the report reveals that weakness remains in the American economy.

The Bureau of Economic Analysis reported that gross domestic product grew at an annual rate of 3.2%, substantially above the projected 2.1%, buoyed by stronger state and local government spending, lower imports and business inventories.

The rate is a first estimate, and it may be revised as more data comes in over the next few weeks. It would have been even stronger, the BEA concluded, without the government shutdown — which subtracted 0.3 percentage points from growth in the first quarter rate. Federal spending was flat, since a rise in military spending was offset by a decline in non-defense spending.

The contribution from state and local government spending came largely as a result of highway and road construction, which localities have taken on while waiting for an infrastructure package from the federal government.

Read More