NEW YORK (CNNMoney.com) -- JPMorgan Chase reported a better-than-expected profit of $2.1 billion in the latest quarter, even as the bank aggressively set aside money to cope with rising loan losses, the company said Thursday.

The New York City-based bank said its net income for the first quarter was $2.1 billion, or 40 cents a share. Profits were down 10% from a year ago, but still handily beat expectations.

Analysts were anticipating JPMorgan Chase to record a profit of $1.38 billion, or 32 cents a share, for the quarter, according to Thomson Reuters.

Bolstering the bank's results were both its consumer and investment banking divisions, but JPMorgan Chase also logged $10 billion in credit costs during the quarter, which included a $4 billion addition to its loan loss reserves.

JPMorgan Chase CEO Jamie Dimon warned that this number could go higher if the recession intensifies, but added that he was comforted by his firm's robust capital levels.

"These levels of capital and reserves, combined with our significant pre-provision earnings power, enable us to withstand an even worse economic scenario than we face today," Dimon said in a statement.

As of the end of the quarter, Chase's Tier 1 capital ratio, a key measure of a bank's ability to absorb losses, stood at 11.3%. Not including the $25 billion that the Treasury Department injected into the firm in October, Chase's Tier 1 ratio was 9.2%. A Tier 1 ratio above 8% is generally considered healthy.

JPMorgan Chase is among a handful of banks that have hinted at their interest in repaying taxpayer funds they received from the Treasury's Troubled Asset Relief Program, or TARP, given the increasing restrictions imposed on banks participating in government rescue programs.

Goldman Sachs announced earlier this week that it would sell new stock to help pay back the government. During a conference call with analysts and investors Thursday morning, Dimon said that Chase would like to repay TARP money "as soon as possible."

He added that the company was waiting for the results of the stress test that regulators are conducting on Chase and other big banks, and guidance from the government before proceeding with a return of taxpayer funds.

Dimon also said that, unlike Goldman Sachs, he did not think Chase would have to raise more capital in order to pay back the TARP money.

"I don't see why a company with [our] kind of capital would need to raise capital," he said.

Dimon added that his firm had no intention of participating in the Treasury Department's soon-to-be launched Public-Private Investment Program, or PPIP. That program will allow banks to sell troubled loans or securities to investors partnering with the government.

Dimon told investors Chase was not concerned about whether the program would be effective. Instead, he said the bank did not want to be any more dependent on the government than it already is.

Banks that have taken taxpayer money have come under intense scrutiny of their compensation practices and overall spending habits in recent months.

"We are certainly not going to borrow from the federal government," he said. "We have learned our lesson about that."

Investment banking bounces back, cards take a hit

Delving deeper into the results, Chase's investment banking division came roaring back from a loss in the fourth quarter and posted a profit of $1.6 billion.

The strong investment banking performance was driven by a revenue surge in its fixed income division, which reported record results in some of its operations including foreign exchange and emerging markets.

Those results mirrored numbers put up by rival Wall Street firm Goldman Sachs (GS, Fortune 500), which reported a much-better-than-expected $1.8 billion profit earlier this week.

The disappearance of Lehman Brothers and absorption of Merrill Lynch by Bank of America has benefited both firms, but many analysts are already wondering whether their respective investment banks can maintain this pace.

"Both of those banks took market share," said Richard Staite, a London-based banking analyst with Atlantic Equities who tracks the company. "The question is how sustainable that revenue source is going forward."

Also contributing to Chase's overall profit for the quarter was its retail financial services and commercial banking divisions, but those gains were offset in other areas.

Chase's credit card division, for example, reported a net loss of $547 million, down from a profit of $609 million a year ago. The bank cited a sizable increase in allowances for loan losses and higher charge-offs, or loans the company doesn't think are collectable.

"This unit, to no one's surprise, is showing large losses," said Bart Narter, an analyst for the Boston-based financial research and consulting firm Celent.

Despite facing the threat of rising credit costs, Dimon maintained that the bank was financially strong enough to weather the current downturn, and is well-positioned for an eventual recovery.

The bank also noted that it was making "excellent progress" with its late September purchase of failed Seattle-based lender Washington Mutual.

Chase has been working hard to integrate WaMu's assets, including its nationwide retail branch network. Chase said that it had total branches of just under 5,200 as of the end of the quarter, down from 5% from late last year as it consolidated some Chase and WaMu locations.

Chase's encouraging results come on the heels of impressive numbers put up in the last week by two of its biggest rivals - Goldman Sachs and Wells Fargo (WFC, Fortune 500).

Both companies shattered Wall Street's earnings forecasts, with San Francisco-based Wells Fargo adding last week it expected to book a record profit of $3 billion in the latest quarter.

Following Chase's report, investors' eyes will now turn to two of the nation's most embattled banks - Citigroup (C, Fortune 500) and Bank of America (BAC, Fortune 500). Citi and BofA are slated to report their first quarter numbers Friday and Monday respectively.

Shares of JPMorgan Chase (JPM, Fortune 500), which are up more than 50% from lows reached earlier this year, rose more than 3% in early morning trading.