WASHINGTON (AP) — The average rate on a 30-year U.S. mortgage fell modestly for the second straight week, but home borrowing costs remain elevated.

The long-term rate inched back to 6.84% from 6.85% last week, mortgage buyer Freddie Mac said Thursday. A year ago, the rate averaged 6.95%.

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. The key barometer is the 10-year Treasury yield, which lenders use as a guide to pricing home loans.

The 10-year Treasury yield was at 4.38% at midday Thursday, down from 4.58% just a few weeks ago.

Bond yields have retreated in recent weeks but broadly have been trending higher since hitting 2025 lows in early April, reflecting investors’ uncertainty over the Trump administration’s ever-changing tariffs policy and worry over exploding federal government debt.

The average rate on a 30-year mortgage has remained relatively close to its high so far this year of just above 7%, set in mid-January. The 30-year rate’s low point this year was in early April when it briefly dipped to 6.62%.

High mortgage rates can add hundreds of dollars a month in costs for borrowers and reduce their purchasing power. That’s helped keep the U.S. housing market in a sales slump that dates back to 2022, when mortgage rates began to climb from the rock-bottom lows they reached during the pandemic.

Last year, sales of previously occupied U.S. homes sank to their lowest level in nearly 30 years. Sales fell last month to the slowest pace for the month of April going back to 2009.

Rising mortgage rates have helped dampen sales during what’s traditionally the peak period of the year for home sales. However, last week mortgage applications rose for the first time in four weeks, according to the Mortgage Bankers Association. Mortgage applications jumped 13% from the previous week as rising inventory lured more buyers, the group said. Applications are up 20% from a year earlier.

Other recent data suggests sales could continue to slow in the coming months. An index of pending U.S. home sales fell 6.3% in April from March and declined 2.5% from April last year, the National Association of Realtors reported two weeks ago.

There’s usually a month or two lag between a contract signing and when the sale is finalized, which makes pending home sales a bellwether for future completed home sales.

Economists expect mortgage rates to remain relatively stable in the coming months, with forecasts calling for the average rate on a 30-year mortgage to remain in a range between 6% and 7% this year.

Borrowing costs on 15-year fixed-rate mortgages, popular with homeowners refinancing their home loans, declined to 5.97% from 5.99% last week. The average a year ago was 6.17%, Freddie Mac said.