Updated from 9:05 a.m. EST

Wells Fargo ( WFC) shares were on the rise, despite posting a 38% drop in fourth-quarter profit due to the deepening slump in the mortgage market.

In the final three months of 2007, the bank, the nation's second biggest mortgage lender after Countrywide Financial ( CFC), reported profit dropped 38% to $1.36 billion, or 41 cents a share, compared to $2.18 billion, or 64 cents a share, in the year-ago period.

Wells Fargo met analysts' profit expectations of 41 cents a share on roughly $10 billion of revenue. Shares recently were up 66 cents, or 2.5% to $27.15.

The fourth-quarter results included a previously announced charge to set aside extra money to protect against loan losses in home equity loans -- the company's riskiest loan base. Wells Fargo announced in November that it would take a $1.4 billion provision , amounting to 27 cents a share, for current and future losses in approximately $12 billion worth of home equity loans, which were placed in a separate portfolio.

The loans were either purchased or originated through indirect channels, such as wholesale mortgage lending platforms and the correspondent channel, Wells said. The bank still has approximately $73 billion of home equity loans, most of which were originated through its retail franchise.

Like several other banks, Wells Fargo also took a $203 million pretax charge, or 4 cents a share, for a settlement between American Express ( AXP) against Visa and a host of member banks for allegedly conspiring to keep American Express out of the bank-issued credit card business.

"While we're not immune to the unexpectedly sharp and rapid downturn in housing, and our earnings were reduced in the fourth quarter by the $1.4 billion credit reserve build, primarily for home equity losses, we largely avoided the problems and costly asset writedowns many large financial institutions incurred," said CFO Howard Atkins.

"With our strong capital position, the challenges facing the industry and the significant upward repricing of asset spreads, we are finding significantly more opportunities now for acquisitions, portfolio purchases, and attractive loan and asset purchases than we have seen in the past five years," Atkins added.

Still, President and CEO John Stumpf said that he expects the environment to remain challenging in 2008, "particularly in the consumer sector."

Wells Fargo set aside a total of $2.6 billion in the quarter for loan losses, which included net charge-offs of $1.2 billion and the previously announced $1.4 billion provision.

Total nonperforming assets were $3.87 billion, an increase of 60% from the year-ago quarter, which included $2.68 billion of nonperforming loans, but also $535 million of Government National Mortgage Association repurchases and $649 million of foreclosed real estate and repossessed vehicles.

The majority of the increase was due to national rise in foreclosure rates and the company's decision to hold onto more foreclosed properties than it has historically, the bank said.

To date, the financial services industry has taken more than $100 billion in credit reserves builds and asset writedowns, according to Wells Fargo.

On Wednesday, JPMorgan Chase ( JPM) said it took $1.3 billion in writedowns from mortgage-related investments, which caused the New York-based bank to miss analysts' estimates by 6 cents a share. The nation's third-largest bank behind Citi and Bank of America ( BAC), JPMorgan saw profits fall by 34% from a year ago to $2.97 billion.

But both JPMorgan and Wells Fargo have remained relatively resilient, as many other financial services companies reel from multi-billion writedowns on mortgage-backed securities and collateralized debt obligations, or CDOs, as well as higher credit costs that are eating at their capital levels.

The persistent problems of the credit crunch and mortgage industry decline forced Countrywide to agree to sell itself to BofA for $4 billion last week. It also forced financial titan Citigroup ( C), which on Tuesday reported a fourth-quarter net loss of nearly $10 billion due to $18.1 billion in writedowns, to slash its dividend and seek additional capital in order to steady its business.

For the full year, Wells Fargo posted a profit of $8.06 billion, or $2.38 a share, 4% lower than the $8.42 billion, or $2.47 a share it reported in 2006. The company said it had "record revenue" for the full year of $39.4 billion.

Wells said that average loans rose 20% to $374 billion in the fourth quarter vs. a year earlier, while commercial and commercial real estate loans rose 24%. Core deposits rose 11% to $315 billion, it said.

In addition, the company's net interest margin -- the profit it makes on taking deposits and lending them out again -- rose 7 basis points from the third quarter to 4.62%.

Lori Appelbaum, an analyst at Goldman Sachs, said in a note Wednesday morning that she expected Wells Fargo's stock to rise since there were concerns that credit quality in fourth quarter could have been worse than the company previously warned, given its high exposure to California, a state she views as currently in a recession.

Moody's Investors Service affirmed on Wednesday its Aa1 rating and stable outlook on Wells Fargo and its subsidiaries. The bank is rated A for financial strength and Aaa for deposits, Moody's said.

"Wells Fargo has the financial flexibility to absorb the relatively high level of charge-offs in its home equity portfolio that Moody's expects could occur over the next six to eight quarters," Moody's said. But the bank's losses in its ongoing home-equity portfolio going forward could be higher than previously expected, Moody's added.

"This particularly results from loans with high combined-loan-to-values in tandem with the home-value depreciation that has occurred, and is expected to continue to occur, in many regions in which Wells Fargo operates," it said. " The default frequency in this portfolio is likely to rise and severity of loss will be high."

Atkins said in a pre-recorded conference call that "given the weakness in housing and the overall state of the U.S. economy, it is likely that charge-offs will be higher in 2008 than they were in 2007."

"But we believe our business model, the actions we have already taken to reduce risk, and our deep, experienced team -- which has successfully managed through many prior cycles -- will position us properly for the challenges that may be ahead, especially relative to our large bank peers," he said.

If you liked this article you might like

The 10 Best Jobs in America for 2016

The 10 Best Jobs in America for 2016

20 Best Colleges for Campus Food

20 Best Colleges for Campus Food

10 Consumer Stocks With the Highest Earnings Growth Last Quarter

10 Consumer Stocks With the Highest Earnings Growth Last Quarter

5 Stocks Dumped by Hedge Funds Last Quarter

5 Stocks Dumped by Hedge Funds Last Quarter

15 Most Lucrative Jobs in the Tech Industry

15 Most Lucrative Jobs in the Tech Industry