The average rate on a 30-year mortgage in the U.S. rose for the fifth straight week, returning to its highest level since early August.

The rate rose to 6.72% from 6.54% last week, mortgage buyer Freddie Mac said Thursday. That’s still down from a year ago, when the rate averaged 7.76%.

Borrowing costs on 15-year fixed-rate mortgages, popular with homeowners seeking to refinance their home loan to a lower rate, also increased this week. The average rate rose to 5.99% from 5.71% last week. A year ago, it averaged 7.03%, Freddie Mac said.

When mortgage rates increase they can add hundreds of dollars a month in costs for borrowers, reducing homebuyers’ purchasing power at a time when home prices remain near all-time highs though the housing market is in a sales slump going back to 2022.

The average rate on a 30-year home loan hasn’t been this high since Aug. 1, when it was 6.73%.

Mortgage rates are influenced by several factors, including how the bond market reacts to the Federal Reserve’s interest rate policy decisions and data on inflation and the economy. That can move the trajectory of the 10-year Treasury yield, which lenders use as a guide to pricing home loans.

The yield on the 10-year Treasury was at 4.30% on the bond market at midday Thursday. It was at 3.62% as recently as mid-September, just days before the Federal Reserve cut its main interest rate for the first time in more than four years and signaled further cuts through 2026. While the central bank doesn’t set mortgage rates, its policy pivot cleared a path for mortgage rates to generally go lower.

But that hasn’t been the case in recent weeks because a string of encouraging reports on inflation and the U.S. economy have pushed Treasury yields higher.

On Tuesday, reports said confidence among U.S. consumers jumped more than economists expected, while the number of job openings edged lower in September, though the number of hires remained relatively steady. If the government’s October U.S. jobs report on Friday also comes in hotter than anticipated, that could push bond yields higher.