Rocket Companies Inc., one of the nation’s largest mortgage lenders, reported a 277% increase in quarterly profit, punctuating a record-setting year as the home-loan specialist rode the U.S. housing rally.

The company posted adjusted revenue that beat estimates. And with a ten-fold increase in net income last year to $9.4 billion, Rocket declared a special dividend of $1.11 per share, according to a statement on Thursday. Shares surged as much as 7.8% to $21.46 in late trading.

“We successfully drove growth in every segment of our business,” Rocket Chief Executive Officer Jay Farner said in the statement.

The pandemic real estate boom gave a major boost to the mortgage industry, which posted record loan volume and profits in 2020 as rates dipped to historic lows. Much of that was thanks to the Federal Reserve, which kept a lid on borrowing costs and bought mortgage bonds as part of its bid to stimulate the economy.

But profitability may have peaked. Rocket reported a 4.41% profit margin on newly originated loans last quarter, well above the company’s November estimate of 3.8% to 4.1%. It told investors on Thursday to expect margins on new loans this quarter to be around 3.6% to 3.9%.

Mortgage lenders have been warning investors in recent weeks that profitability won’t expand this year. UWM Holdings Corp., the parent company of United Wholesale Mortgage, said profits on new loans this quarter could fall by as much as one-third from last year’s fourth quarter.

Mr. Cooper Group Inc., meanwhile, said this week that its gains on mortgage sales — lenders generally sell the loans they originate — will be roughly flat this quarter.

RELATED: Mortgage lenders going public in 2020: a timeline

Mortgage rates in the U.S. rose this week to the highest level in six months, threatening to snuff out the mortgage rally. And with Treasury yields ticking higher, borrowing costs could continue to climb.

That could deter more Americans from seeking to refinance debt, while surging home prices are pushing ownership out of reach for many.

Mortgage applications fell to a nine-month low last week, while pending home sales last month dropped to a six-month low.