With the upswing in credit quality expected to slow, Wells Fargo’s (WFC) primary mortgage business is coming into focus.

Wells Fargo, the nation’s largest mortgage lender, is considered a bellwether for the housing market. The financial sector has seen mortgage originations and refinancing activity decline in recent quarters, and home sales were soft for much of the first half.

In the second quarter, the San Francisco-based bank booked home lending originations of $47 billion, well below the prior year’s $112 billion but stronger than the $36 billion in the first period. Mortgage bank non-interest income dropped 39% to $1.72 billion.

Eric Wasserstrom, an analyst at SunTrust Robinson Humphrey, said the mortgage results were slightly stronger than expectations, which were reduced to reflect a tepid market for home purchases.

“The mortgage business is rebounding with seasonal trends,” Wasserstrom explained.

For Wells Fargo, mortgage weakness continued to be offset by better credit conditions in the latest period. Banks have benefited from stronger credit quality, lowering reserves that are held to cover loan losses. Reserve releases bolster quarterly profits for banks.

But Wells Fargo cautioned that the rate of credit improvement may cool as lending picks up. Chief risk officer Mike Loughlin said the bank sees future reserve releases “absent a significant deterioration in the economic environment.” However, Wells Fargo expects a lower level of releases as credit improvement slows down, Loughlin added.

Wells Fargo’s first-quarter reserve release checked in at $500 million, level with the first quarter and prior year. Credit-loss provisions were $217 million, down from year-ago quarter’s $652 million.

“Credit continues to be a tailwind, but we’re getting close to the bottom of the ninth inning on that front,” Wasserstrom said.

Total loans in the second quarter climbed 3.6% to $828.9 billion, fueled by an 11% improvement in auto loans. Net interest margin, a measure of how much a bank makes on lending versus what it pays depositors, narrowed to 3.15% from 3.4% last year and 3.2% in the prior quarter.

Overall, Wells Fargo logged a profit of $5.73 billion for the period ended June 30, up nearly 4% from $5.52 billion in the year-ago quarter. On a per-share basis, earnings climbed three cents to $1.01, matching Wall Street’s consensus estimate. Revenue fell 1.5% to $21.07 billion but still beat expectations of $20.84 billion.

Shares ticked 18 cents lower to $51.63 in recent trading. As of Thursday’s close, Wells Fargo was up 14.1% since the start of 2014, outpacing J.P. Morgan Chase (JPM) and Bank of America (BAC).

Wells Fargo has weathered the storm in investment banking better than many of its rivals, given its focus on lending to consumers and businesses. Declines in trading revenue have weighed on the banking sector. After limiting their exposure to certain businesses after the financial crisis, some firms didn’t fully capitalize on the rebound in housing and auto loans.

Signs of strong credit quality still bode well for other banks, many of which are due to report earnings next week. Citigroup (C) is scheduled to disclose its quarterly earnings on Monday, followed by J.P. Morgan Chase (JPM) on Tuesday and Bank of America (BAC) on Wednesday

“I’d speculate that the read-throughs are pretty straightforward,” Wasserstrom said. “Loan growth is improving incrementally. The open question is pricing competition in loans.”

Wells Fargo’s community banking segment saw its profit improve to $3.43 billion, up 5.7% year-over-year. Wholesale banking, which lends to corporations and includes a small investment banking business, recorded a 2.6% increase in earnings to $1.95 billion.

The company saw a slight drop in noninterest expense to $12.19 billion.

Follow Matthew Rocco on Twitter @MatthewRocco