Mortgage rates continued trending upward last week, according to new data released Thursday by Freddie Mac.

The 30-year fixed-rate average last week increased from 3.91 percent to 3.98 percent, coming awfully close to the 4-percent mark, which is has not surpassed in more than a year. This time last year, the 30-year averaged 3.71 percent.

Meanwhile, after moving above 3 percent for the first time in a year, the 15-year average pushed even higher, up to 3.10 percent from 3.03 percent last week. That is slightly higher than one year ago, when it averaged 2.98 percent.

“Fixed mortgage rates crept up further this week following a solid employment report for May,” Frank E. Nothaft, Freddie Mac vice president and chief economist, said in a statement. “The economy added 175,000 new jobs and the number of discouraged workers fell by 780,000 to the fewest since September 2009.”

Hybrid adjustable rate mortgages held relatively steady last week, with the five-year ARM nudging up only 0.05 points to 2.79 percent and the 1-year unchanged at 2.74 percent.

Both are below their levels at this time last year, and the gap is widening between the fixed- and adjustable-rate mortgage premiums. Consequently, more homeowners have started turning to the ARMs.

“With the ongoing run up in fixed mortgage rates, adjustable-rate mortgages are becoming more popular among homeowners looking to refinance and for home purchasers,” Nothaft said, noting that, in terms of total dollars, the share of mortgage applications for ARMs has jumped to 17 percent from 13 percent at the beginning of May.

Mortgage application volume reversed course last week, increasing 5.0 percent after several straight weeks of decline, according to the latest figures from the Mortgage Bankers Association. The group’s weekly purchase index jumped 14 percent and the refinance index jumped a more modest 5 percent.

The number of individuals who are underwater on their mortgages is falling, too. On Wednesday, CoreLogic, a research firm, reported that the number of homeowners who owe more than their homes are currently worth dropped to 9.7 million during the first quarter of the year, down from 11.4 million during the same period in 2012.

The shift is largely the result of a gradual increase in home prices earlier this year, which helped more homeowners get back into the black on their mortgages.