US home construction in August hit its fastest pace in 12 years amid a surge in the building of apartment houses, official data showed Friday.

Meanwhile, permits for construction, a sign of supply in the pipeline, also bounded higher, with the multi-family segment likewise leading the way, the Commerce Department reported.

The late-summer construction rush reversed months of stagnation in the housing market, where uncertainty about damage from the trade war had made home builders wary.

The key sector of the economy has also faced constraints from a shortage of workers, higher costs for some materials, and rising house prices which have deterred would-be homebuyers.

The increase could also support GDP growth in the third quarter of the year but economists cautioned against reading too much into a single month's data.

Housing starts in August jumped 12.3 percent to an annual rate of 1.36 million, the fastest pace since June of 2007, according to the monthly report, shattering economists' forecasts.

The all-important single-family segment rose only 4.4 percent, well within the margin of error, but apartments zoomed up 30.9 percent.

Meanwhile, permits for construction likewise hit their fastest pace since 2007, rising 7.7 percent to an annual rate of 1.42 million units.

"Homebuilders have been nervous, given the uncertainty triggered by the trade war and the accompanying volatility in the stock market but their confidence has risen in recent months and single-family permits are trending upwards," Ian Shepherdson of Pantheon Macroeconomics wrote in a note to clients.

"We look for further gains."