Groundbreakings on new homes jumped 9.7 percent last month to the highest level since October 2016, welcome news for a housing market struggling with a shortage of homes for sale.

The Commerce Department said Friday that housing starts came in at an annual pace of 1.33 million in January, up from 1.21 million in December and 1.24 million in January 2017. Construction of single-family homes rose 3.7 percent. Construction of apartments and condominiums shot up 19.7 percent, the most since December 2016.

Home construction soared 45.5 percent in the Northeast, rose 10.7 percent in the West and grew 9.3 percent in the South. But homebuilding dropped 10.2 percent in the Midwest.

Building permits, an indicator of future construction, rose 7.4 percent in January.

A strengthening economy has given more Americans the confidence to shop for homes. But despite last month's uptick, builders haven't been putting up homes fast enough to meet demand.

A shortage of houses on the market has driven up prices and blunted sales. Standard & Poor's reported last month that U.S. home prices rose 6.2 percent in November from a year earlier, according to its CoreLogic Case-Shiller national home price index. And sales of existing homes fell 3.6 percent in December, though sales rose slightly for the full year 2017 from 2016, according to the National Association of Realtors.

Meanwhile, mortgage rates are creeping up. The rate on the benchmark, 30-year, fixed-rate mortgage rose to 4.38 percent this week, the highest level since April 2014.

Ian Shepherdson, chief economist at Pantheon Macroeconomics, noted that apartment construction is notoriously volatile and likely would drop in February after the January surge.

Construction of single-family homes in January was "much less exciting ... the underlying story here is that housing construction is grinding slowly higher, and likely will continue to do so through mid-year at least," Shepherdson wrote in a research note. "Higher mortgage rates are likely to become a problem later in the year."

Still, builders are optimistic about the outlook for housing. The National Association of Home Builders/Wells Fargo builder sentiment index released Thursday read 72 for the second straight month in February, just shy of the 18-year high for optimism recorded in December.

Readings above 50 indicate more builders see sales conditions as good rather than poor. The index has been above 60 since September 2016.