Average long-term U.S. mortgage rates jumped this week to their highest levels this year, with the key 30-year rate topping 4 percent for the first time since late 2014.

Rates have been surging amid signs of improvement in the economy, which have pushed bond prices lower and bond yields higher. Mortgage rates often follow the yield on the 10-year Treasury note, which reached a high for the year of 2.49 percent Wednesday. That was up from 2.37 percent a week earlier.

The increase in mortgage rates has come during the height of the spring home buying season.

Mortgage giant Freddie Mac said Thursday the average rate on a 30-year fixed-rate mortgage climbed to 4.04 percent this week from 3.87 percent a week earlier. It's the first time the benchmark average rate has exceeded 4 percent since last November, when it was 4.02 percent. The rate on 15-year fixed-rate mortgages increased to 3.25 percent from 3.08 percent.

A striking sign of improvement in the economy came last Friday, when the government reported that U.S. employers added 280,000 jobs in May. That was a surprisingly robust tally at a time when consumers are hesitant to spend and some key industries like energy and manufacturing have been struggling.

The report from the Labor Department showed that employers seem confident that the economy is regaining its footing after shrinking at the start of the year and that their customers' demand will accelerate. And the new data led many economists to predict that the Federal Reserve will raise interest rates as early as September because the economy might no longer need the stimulus of near-zero rates. The Fed has kept them at that level for more than six years.

Despite their recent surge, though, mortgage rates remain low by historic standards. A year ago, the average 30-year rate was 4.20 percent and the 15-year was 3.31 percent.

To calculate average mortgage rates, Freddie Mac surveys lenders across the country at the beginning of each week. The average doesn't include extra fees, known as points, which most borrowers must pay to get the lowest rates. One point equals 1 percent of the loan amount.

The average fee for a 30-year mortgage was unchanged from last week at 0.6 point. The fee for a 15-year loan rose to 0.6 point from 0.5 point.

The average rate on five-year adjustable-rate mortgages increased to 3.01 percent from 2.96 percent; the fee declined to 0.4 point from 0.5 point. The average rate on one-year ARMs fell to 2.53 percent from 2.59 percent; the fee remained at 0.2 point.