Wells Fargo reported its 10th consecutive quarter of earnings growth as a result of a booming business originating and refinancing mortgages.

The bank’s second-quarter profit was a record $4.6 billion, a 17 percent rise from the $3.9 billion profit it reported a year earlier. The San Francisco-based company earned 82 cents a share, above the 81 cents expected by the analysts polled by SNL Financial.

Wells has largely skirted the trading and derivatives controversies that have engulfed many of its large competitors and it recently passed JPMorgan Chase to become the largest American bank by stock market capitalization.

Wells has grown its Wall Street operations, like commercial lending, as others have cut back. But it has continued to rely largely on its consumer banking business, and particularly its mortgage lending division, which has benefited from record-low interest rates.

The bank originated $131 billion of mortgages in the second quarter, up from $129 billion in the first quarter of the year and up from and $64 billion a year ago.

“Mortgage volumes have been much stronger than anyone expected a year ago, or even three months ago,” the bank’s chief financial officer, Timothy J. Sloan said on a conference call on Friday morning.

The bank also grew its lending to customers for car purchases and credit cards, which Mr. Sloan attributed to the improving financial situation of American consumers.

Meanwhile, the improving credit quality of the bank’s customers allowed the banks to set aside less money for loan losses.

“While consumers are still under stress on average, their health continues to improve,” Mr. Sloan said in an interview.

Revenues across Wells Fargo were up to $21.3 billion from $20.4 billion a year ago. Profits were up at each of the bank’s three business divisions: wholesale banking, community banking and wealth management.

“This quarter the numbers looked good, and the outlook generally remains pretty strong as well,” said Scott Siefers, a bank analyst at Sandler O’Neill.

Wells took a hit on Thursday when it was announced that it would pay $175 million to settle Justice Department accusations that it discriminated against some minority homeowners seeking loans from 2004 to 2009. In making the settlement, Wells denied the charges.Wells shares closed Friday up 3 percent to $33.91. The company began the year trading at about $28.