JPMorgan Chase & Co said investment banking and trading drove a larger-than-expected 36 percent jump in quarterly profit despite a surge in credit card and loan losses that could worsen.

Though the second-largest U.S. bank is widely considered among the healthiest of the nation's major lenders, it added $2 billion to credit reserves in the quarter and set aside more than twice as much as a year earlier for bad loans. It said credit quality in consumer mortgages and credit cards is deteriorating faster than it expected.

Chief Executive Jamie Dimon said the bank was confident that its capital, reserve levels and earnings power were solid despite a difficult economic environment that could worsen.

Second-quarter net income rose to $2.72 billion from $2 billion a year earlier, the bank reported on Thursday. Net revenue jumped 41 percent to $27.71 billion.

Profit per share fell to 28 cents from 53 cents as the number of shares outstanding increased.

Analysts on average expected profit of 4 cents per share on revenue of $25.91 billion, according to Reuters Estimates.

The results followed better-than-expected earnings posted Tuesday by Goldman Sachs Group Inc. Bank of America Corp and Citigroup Inc, JPMorgan's main rivals, may fare less well when they report results, expected Friday.

It looks like good, strong numbers, and it looks pretty broad-based, said Michael Hecht an analyst at JMP Securities. We are in an increasing world of haves and have-nots, and we know where JPMorgan and Goldman fall.

JPMorgan last month repaid $25 billion taken from the Troubled Asset Relief Program. The New York-based bank has said it will let the Treasury Department auction the attached stock warrants, rather than pay an inflated price to buy them back.

Second-quarter results included per-share charges of 27 cents relating to the TARP repayment and 10 cents to bolster a federal deposit insurance program.

JPMorgan shares rose 18 cents to $36.44 in premarket trading. Through Wednesday, the shares were up 15 percent this year, compared with a 14.4 percent drop in the KBW Bank Index.

INVESTMENT BANK STRONG

Profit in the investment bank more than tripled to $1.47 billion, helped by record investment banking fees and fixed-income trading revenue.

Offsetting this was a $672 million loss in credit card operations, reflecting in part the September acquisition of the bank units of the failed Washington Mutual Inc. JPMorgan boosted its projected losses on cards and sees a loss rate of about 10 percent for this quarter.

Consumer banking's profit nearly vanished, falling to $15 million from $503 million, hurt by soaring credit losses tied to housing, including from Washington Mutual.

The bank said it set aside $9.7 billion in the quarter for credit losses, up from $4.29 billion a year earlier but down from the first quarter's $10.07 billion.

JPMorgan now expects near-term quarterly losses of about $600 million from prime-quality mortgages, up from $500 million it forecast in April, and $500 million from subprime mortgages, up from a previous forecast of $375 million to $475 million.

(Reporting by Jonathan Stempel; Additional reporting by Steve Eder; editing by John Wallace)