Housing starts surged in July to the highest level in eight months, underscoring the recent pickup in builder optimism as the U.S. residential real-estate market gains some traction.

Beginning home construction climbed 15.7 percent to a 1.09 million annualized rate following June’s 945,000 pace, which was stronger than previously reported, the Commerce Department said Tuesday in Washington. The level exceeded the highest estimate in a Bloomberg survey of economists, whose median projection called for 965,000 starts.