The average long-term U.S. mortgage rate edged higher this week, staying close to 6.5%, where it’s been the last six weeks.The benchmark 30-year fixed rate mortgage rate rose to 6.49% from 6.47% last week, mortgage buyer Freddie Mac said Thursday. One year ago, the average rate was 6.77%.When mortgage rates rise they can add hundreds of dollars a month in costs for borrowers, reducing their purchasing power.Borrowing costs on 15-year fixed-rate mortgages, often sought by borrowers refinancing a home loan, also rose this week. That average rate ticked up to 5.84% from 5.81% last week. A year ago, it was at 5.89%, Freddie Mac said.Mortgage rates are influenced by several factors, from the Federal Reserve’s interest rate policy decisions to bond market investors’ expectations for the economy and inflation. They generally follow the trajectory of the 10-year Treasury yield, which lenders use as a guide to pricing home loans.

Rates have been mostly trending higher since the conflict between the U.S. and Iran began in late February, disrupting the flow of crude oil from the Persian Gulf to customers worldwide. That’s sent oil prices sharply higher, helping drive up inflation, bond yields and mortgage rates.