U.S. construction spending fell in January for the first time in six months as companies cut investment in buildings and the federal government scaled back projects, the Commerce Department said on Thursday.

Construction spending dropped 0.1% to an annual rate of $827 billion, confounding analysts' expectations for a 1% increase.

It was the first drop since July 2011. Spending on homes rose 1.8%, offsetting a 1.5% decrease in spending on business structures. The housing market has been showing signs of an incipient recovery, with builders breaking more ground on new projects to meet growing demand for rental apartments.

Spending on public sector construction fell 0.2% in January, with investment by state and local governments rising modestly but outlays by the federal government plunging 5.5%.

Total private construction spending in January was flat at a $538.7 billion annual rate.