JP Morgan ( JPM) managed to weather the summer's credit crunch, which was brought on by bad mortgage loans made to borrowers with shaky credit histories. So what's next for the New York banking titan? Why, an expansion of its mortgage business, CEO Jamie Dimon said Wednesday morning on a conference call following JPMorgan's better-than-expected third-quarter earnings. "We're taking this time to build our mortgage business," Dimon said. "We love the business. We think it's a critical product." Many of JPMorgan's rivals in the mortgage industry find themselves in critical condition. Some 160 mortgage lenders have gone out of business or significantly retrenched their operations over the past two years -- and the news keeps getting worse. On Tuesday, the nation's biggest independent mortgage lender, Countrywide ( CFC), set plans to take as much as $150 million in writedowns tied to the firing of a fifth of its workforce. On Wednesday, jumbo lender Thornburg ( TMA) saw its shares drop 11% after the company suspended its dividend. All the carnage may put JPMorgan in a position to benefit, given the latest quarter's relatively solid earnings performance. The bank's loan origination grew 35% in the latest quarter from year ago, to $39.2 billion. JPMorgan said third-quarter earnings inched up to $3.4 billion this year from $3.3 billion last year -- a stark contrast to the 57% plunge in profit at rival Citi ( C). JPMorgan wasn't immune to the seizing of the loan market. The bank said it took markdowns of $1.3 billion on leveraged lending funded and unfunded commitments and weaker trading performance. But it was able to benefit from other areas including retail financial services, which saw revenue rise 18% from a year ago. As rivals fall out of the mortgage business, JPMorgan's plan is to gain market share, said a spokesman for the bank. JPMorgan says it continues to originate subprime and other loans that are not purchasable by Fannie Mae ( FNM) and Freddie Mac ( FRE), the government-sponsored mortgage investors whose role in the market loans and house them on its balance sheet. Of course, gaining market share amid a vicious housing slump may be easier said than done. Earlier this year, Countrywide said it viewed the failure of its subprime lending rivals as an opportunity to expand. But the company's shares have since lost more than half their value, and the company needed to tap a bank credit line in August just to stay afloat. Dimon says JPMorgan, for its part, will be looking to focus more on retail growth and less on originating loans to be sold via third-party brokers. Dimon took a sanguine but cautious tone during the call. "Trading has been OK but clearly there's still a lot of issues that'll take some time to resolve," he said.