WASHINGTON (MarketWatch) -- The U.S. economy grew in the fourth quarter -- but just barely -- instead of contracting for the first time in 3 1/2 years, the Commerce Department said Thursday. The U.S. expanded at a 0.1% annual rate in the last three months of 2012, better than the initially reported 0.1% drop but well below the third quarter's 3.1% pace. Stronger residential construction and an improvement in net exports pushed growth into positive territory. They offset a bigger decline in government spending than previously suggested, as well as a sharper deceleration in the buildup of business inventories. Construction spending on new homes was revised up to a 17.5% increase from 15.3%. Exports fell a revised 3.9% instead of 5.7%, while imports dropped a sharper 4.5% vs. an initially reported 3.2% decline. Consumer spending was revised down a tick to 2.1%, while government spending dropped 6.9% instead of 6.6% as originally reported. Business inventories, meanwhile, grew a scant $12 billion in the fourth quarter after advances of $60.3 billion in the third quarter and $41.4 billion in the second. The slower pace of inventory growth subtracted 1.6 percentage points from fourth-quarter GDP. Lower government spending chopped 1.4 percentage points off GDP. Also, the government trimmed the increase in personal income in the fourth quarter to a 6.2% gain from 6.8% previously. Inflation as measured by the PCE index rose at a subdued 1.5% rate, or by 0.9% excluding food and energy. The government revises the original GDP report twice to incorporate fresh data not available at the time of the preliminary reading. A third and final reading will come out next month.