WASHINGTON — Long-term U.S. mortgage rates rose this week for a second straight week, posting new highs for the year. The markets were anticipating an increase in a key interest rate by the Federal Reserve, which the Fed announced Wednesday.

Mortgage buyer Freddie Mac says the rate on 30-year, fixed-rate loans climbed to 4.30 percent from 4.21 percent last week. The benchmark rate stood at 3.73 percent a year ago and averaged 3.65 percent through 2016, the lowest level in records dating to 1971.

The rate on 15-year mortgages increased to 3.50 percent from 3.42 percent last week.