A surge in single-family home construction drove U.S. housing starts higher in July even as higher interest rates weighed on plans for future projects more than expected.

Single-family home building rose 6.7 percent in July compared with a month earlier to a seasonally adjusted, annual rate of 983,000, government data showed Wednesday.

Multifamily construction fell 1.7 percent to a seasonally adjusted, annual rate of 460,000.

Combined, residential housing starts grew by 3.9 percent last month to a 1.45 million annualized rate.

Housing starts have been buoyed by the lack of inventory of existing homes for sale. Since most people selling a home are also planning to buy a home, high home prices and elevated mortgage rates have discouraged many homeowners from selling their homes. Many are reluctant to give up a mortgage with a mortgage rate of around three or four percent for one with current rates of around seven percent.

Applications to build homes, a proxy for future construction, ticked up 0.1 percent to an annualized pace of 1.44 million units. That was slightly below what Wall Street expected, held back by a decline in multifamily permits.

Permits to build single-family homes rose 0.6 percent to an annual rate of 930,000, the highest level in more than a year. Permits are considered a leading indicator for future construction.