Mortgage rates have been on a steady upward march since the end of last year. But, this week, they shot up to their highest levels in nearly two years.

According to data released Thursday by Freddie Mac, the 30-year fixed-rate average rose for the third week in a row, hitting 3.45 percent with an average 0.7 point. (A point is a fee paid to a lender equal to 1 percent of the loan amount. It is in addition to the interest rate.) The rate was 3.22 percent a week ago and 2.79 percent a year ago. The 30-year fixed average is at its highest level since March 2020, when it was 3.5 percent.

Freddie Mac, the federally chartered mortgage investor, aggregates rates from around 80 lenders across the country to come up with weekly national averages. The survey is based on residential mortgages. Rates for residential refinances may be different. The analysis uses rates for high-quality borrowers, those who have strong credit scores and make large down payments. Because of the criteria, these rates are not available to every borrower.

The 15-year fixed-rate average jumped to 2.62 percent with an average 0.7 point. It was 2.43 percent a week ago and 2.23 percent a year ago. The five-year adjustable rate average climbed to 2.57 percent with an average 0.3 point. It was 2.41 percent a week ago and 3.12 percent a year ago.

“The Freddie Mac fixed rate for a 30-year loan maintained its upward momentum this week, riding a strong inflationary wave, and following the surge in the 10-year Treasury,” said George Ratiu, manager of economic research at Realtor.com. “Investors took note of the acceleration in consumer prices, which rose at the fastest pace in 40 years in December. In addition, the mild impact of the omicron wave, despite the high number of cases, points toward a brighter post-pandemic horizon, a sentiment which underpins a more bullish outlook on the economy.”

Mortgage rates are rising because of inflation and actions by the Federal Reserve. Data from the Bureau of Labor Statistics this week showed prices rose at the fastest pace in four decades in December, increasing 7 percent year-over-year. Inflation is bad for mortgage rates because of what it does to bonds.

Because inflation erodes the value of bonds’ fixed payments, investors tend to sell Treasurys when inflation is rising. Because mortgage rates often follow the same path as long-term bonds, when bond yields rise, so do home loan rates. On Monday, the yield on the 10-year Treasury closed at 1.78 percent, its highest level in two years. It fell back to 1.74 percent on Wednesday.

The Fed’s decision to accelerate the winding down of its bond-buying program to fight inflation is also pushing rates higher. The central bank signaled in December that it might be more assertive with pulling back on bond purchases, hiking interest rates and selling off its balance sheet in the next several months.

“Markets reacted to indications from the Federal Reserve that they will be taking a more hawkish approach to fighting inflation,” said Paul Thomas, the vice president for capital markets at Zillow. “With the latest unemployment rate, many market participants believe this gives the Fed more room to focus on addressing inflation concerns as labor markets are near full-employment levels. Additional comments from the Fed indicated they may shrink their balance sheet faster than previously expected. Markets now appear to be anticipating an initial Fed rate hike in March.”

Bankrate.com, which puts out a weekly mortgage rate trend index, found the experts it surveyed divided on where rates are headed in the coming week. Forty-six percent said rates would go down, 31 percent said they would stay about the same and 23 percent said they would go up.

“The long-term trend points to higher mortgage rates,” said Les Parker, managing director of Transformational Mortgage Solutions. “But after a rapid rise over the last four weeks, expect a drop in rates this week.”

Meanwhile, mortgage applications were up from a week ago. The market composite index — a measure of total loan application volume — increased 1.4 percent from a week earlier, according to data from the Mortgage Bankers Association. The purchase index rose 2 percent, and the refinance index was essentially flat, ticking down 0.1 percent. Conventional refinance applications were at their lowest level in two years. The refinance share of mortgage activity accounted for 64.1 percent of applications.

“The first week of 2022 saw a big jump in mortgage rates, a solid gain in applications to buy a home, and a continuance in the downward trend in refinance activity,” said Bob Broeksmit, the president and chief executive of MBA. “The affordability hit from higher mortgage rates this year will be tempered as long as housing inventory increases enough to moderate home-price growth to healthier, long-term levels.”

The MBA also released its mortgage credit availability index (MCAI) showing credit availability increased in December. The MCAI rose 0.8 percent to 125.9 last month. An increase in the MCAI indicates that lending standards are loosening, and a decrease signals tightening.

“Credit supply increased in December, with growth across both conventional and government segments of the market,” Joel Kan, an MBA economist, said in a statement. “The overall credit index increased to its highest level since May 2021 but remained 30 percent below its pre-pandemic level.”