The mortgage refinance boom helped propel Wells Fargo & Co. profits up 24 percent in the fourth quarter, capping a strong year for the nation's top mortgage lender.

The San Francisco-based lender kicked off the bank earnings season Friday, reporting fourth-quarter profits of $5.1 billion, or 91 cents per share, on sales of $21.9 billion, up 7 percent from a year ago. The results beat consensus Wall Street expectations on both profits and sales.

For the year, the bank's profits were $18.9 billion, or $3.36 per share, up 19 percent from 2011 and beating the consensus analyst expectation by a penny a share.

Mortgage banking income remains a key driver of the bank's profit growth, but Wells Fargo also saw gains from loan growth, increased trust and investment fees, improved credit quality and a reduced need for reserves to cover soured loans.

The bank, which employs about 20,000 people in Minnesota, also reaped above-average private equity gains. That was largely related to Norwest Equity Partners' $1 billion sale of Iowa seed treatment company Becker Underwood Inc.

Still, the bank made fewer new home loans in the fourth quarter than in the third, and its net interest margin -- a key bank measure that shows the difference between what a bank makes on loans and what it pays in interest -- shrank more than analysts expected, to 3.56 percent. The bank blamed the margin shrinkage on strong deposit growth of $30 billion.

Banks of all sizes have seen their net interest margins squeezed by ultra-low interest rates and sluggish loan demand, with customers generally more interested in stashing deposits than taking on debt, an ongoing problem in the industry.

Investors sent Wells Fargo shares down Friday about 1.5 percent as bank stocks in general retreated.

Chairman and CEO John Stumpf hailed 2012 as an "outstanding" year for the bank.

It also was a year of stark reminders of the bank's role in the nation's housing crisis. Wells Fargo was part of the $25 billion government settlement with lenders early last year to resolve accusations of widespread foreclosure abuses, and then agreed to pay at least $175 million to settle Department of Justice allegations of racial bias against black and Hispanic borrowers in its mortgage originations.

In the fourth quarter, the bank took a pretax charge of $644 million to cover its cash payment portion of the recently announced $8.5 billion settlement with federal bank regulators over foreclosure abuses.

Net interest income from lending and securities available for sale fell 2 percent from a year ago to $10.6 billion. Still, the bank saw loan growth despite the widespread angst about the fiscal cliff negotiations, with commercial real estate loans and commercial loans combined rising 3 percent in the fourth quarter from a year earlier.

Non-interest income, which is what the bank makes on such activities as mortgage banking and fees and service charges on credit cards, grew 16 percent from a year ago to $11.3 billion.

Mortgage banking revenue grew, but the bank originated fewer home loans in the fourth quarter than in the third, indicating the boom could be beginning to cool.

Executives told analysts Friday that they expect the boom to continue for a few more quarters but don't know if it will last the year.

With so much of its revenue dependent on the mortgage market, Wells Fargo stands to be affected by the new mortgage rules issued Thursday by the Consumer Financial Protection Bureau. The rules take effect next January.

Stumpf expressed guarded optimism about the new regulations Friday. He said the government's watchdog group "found the right balance" and that he thinks the clarity the rules offered on loan features and legal protections and risks for banks ultimately will help the recovering housing market.

"That alone won't open up the floodgates of credit," Stumpf said. "There's all these other things going on. But I think this is a step in the right direction."

Jennifer Bjorhus • 612-673-4683