NEW YORK (TheStreet) -- Wells Fargo  (WFC - Get Report) , the country's largest mortgage lender, predicted new home loans would drop from an almost two-year high after applications slowed during the past three months and its pipeline shrank by $6 billion.

"We currently expect originations in the third quarter to be lower than the second quarter," when the San Francisco bank extended $62 billion in home loans, the most since the third quarter of 2013, CFO John Shrewsberry said on a conference call with analysts. The gains were driven by growth in markets such as California and New York as well as an increase in first-time home purchases, executives said on the call.

While loan completions increased, however, applications fell 13% from the first three months of the year, and the pipeline of uncompleted mortgages dropped to $38 billion, the company said. 

"Some are surprised the mortgage market has not come back stronger," CEO John Stumpf said on the call. "But we went through a pretty deep downturn. This was the asset class that had the problem in 2008 and 2009, and it's improving and healing, but it's going to take time."

Still, the mortgage market remains strong overall, executives said, and Wells Fargo is optimistic about future growth.

Home loans are "a very important part of the relationship between us and our customers because buying and financing a home is one of the most significant things our customers will ever do," Shrewsberry said. Home loans are grouped under the Community Banking business, Wells Fargo's largest, with $3.36 billion in profits during the second quarter.

The bank emphasizes expanding relationships with its customers by providing a variety of products and services, from checking accounts to credit cards and home and auto loans. Unlike most other big banks, which are closing branches to focus on less costly mobile and online services, Wells Fargo is continuing to increase the number of local offices.

"One of the drivers of our long-term growth is our ability to grow retail bank households," Shrewsberry said on the call. "Year-to-date through May we've had the strongest household growth in four years. This strong growth reflects our success in attracting new customers to Wells Fargo as well as the benefit of better retention of our existing households as we remain focused on meeting their financial needs."

Total revenue in the unit gained $55 million to $12.7 billion in the quarter, while earnings dipped as the bank set aside an extra $84 million to cover unpaid loans, according to a statement.

Companywide, net income dropped 0.2% to $5.72 billion, or $1.03 a share, slightly higher than the $1.025 average estimate from analysts surveyed by Bloomberg. Total revenue increased 0.9% to $21.3 billion, the bank said.

"Service charges on deposits, trust fees, and card fees showed growth, but trust-fee growth slowed and mortgage fees were lower than expected," Ken Usdin, a New York-based analyst with Jefferies, said in a note to clients.

Long-term growth drivers remained strong, CEO John Stumpf said in the statement, with both loans and deposits increasing from the second quarter of 2015. Net interest margin, a gauge of profitability for a bank's lending, improved 2 basis points to 2.97% from the first three months of the year, the first increase in 11 quarters, according to Bill Carcache of Nomura Securities.

That suggests net interest margin -- which compares interest earned on loans to interest paid on deposits -- may have bottomed out and might now be poised for gains, Carcache said in a note to clients. Both Wells Fargo and JPMorgan Chase (JPM) reported that loans grew faster than deposits in the second quarter, he said.

Net interest margin is likely to improve industry-wide, analysts have said, once the Federal Reserve raises interest rates, which were slashed to around zero to bolster the U.S. economy during the financial crisis.

Wells Fargo's total loans increased 3.2% to $888.5 billion, including the purchase of $11.5 billion in loans from GE Capital, which is shrinking as its parent company, General Electric (GE), refocuses on manufacturing.