NEW YORK (CNNMoney.com) -- Goldman Sachs suffered its first loss as a publicly traded company Tuesday, serving as yet another reminder that no corner of Wall Street has escaped the ongoing financial crisis.

Still, the stock soared on the news as investors, fearing the worst, were soothed by the fact that the loss wasn't even bigger.

The once-revered investment bank said it lost $2.1 billion, or $4.97 a share during the fourth quarter, representing the company's first loss since it went public in 1999. A year ago, Goldman reported a profit of $3.2 billion, or $7.49 a share.

Few analysts were expecting the company to maintain its impressive run given the recent market turmoil in the credit and stock markets and the upheaval in the nation's financial services sector.

The results were worse than expected. Consensus estimates were for a loss of $1.63 billion, or $3.73 a share for the quarter, according to Thomson Reuters.

Lloyd Blankfein, Goldman Sachs' chairman and CEO, blamed the company's performance on tough market conditions.

"Our results for the fourth quarter reflect extraordinarily difficult operating conditions, including a sharp decline in values across virtually every asset class," he said in a statement.

Goldman Sachs (GS, Fortune 500) shares, which have lost 69% of their value so far this year, surged 10% in Tuesday afternoon trading. Investors had feared that the firm's results would exceed even the worst expectations.

"[The quarter] was below public expectations, but it wasn't as bad the most pessimistic views," said Mark Lane, equity research analyst at Chicago-based investment firm William Blair & Co. In fact, one analyst was projecting a loss of $6 per share, according to Thomson Reuters.

Also providing some comfort to investors was the bounty of capital the company had on hand at the end of the quarter.

The company's Tier 1 capital ratio, a key measure of a bank's ability to absorb losses was 15.6% at the end of the quarter, up from 11.6% in the previous quarter. A capital ratio above 8% is generally considered a good sign for financial institutions.

Goldman Sachs raised nearly $21 billion in capital during the fourth quarter, selling $5.75 billion in common stock and an additional $5 billion in preferred shares to Warren Buffett's Berkshire Hathaway (BRKA, Fortune 500).

The Treasury Department also injected $10 billion into the firm in October as part of the government's $700 billion bailout program.

The company, known for paying its employees handsomely, also revealed Tuesday that expenses related to compensation and benefits were nearly cut in half during the quarter from a year ago. Blankfein and six other Goldman executives opted to forgo annual bonuses this year.

And in late October, the company moved to cut 10% of its workforce, or about 3,260 jobs.

Trouble spots

Still, all this cost cutting was not enough to completely insulate Goldman from the tumult in the markets. In addition, credit rating agency Moody's downgraded the firm's long-term debt ratings after Goldman reported its loss.

One of the areas hit hardest in the latest quarter was the company's principal investment division business, which suffered a $3.6 billion loss during the quarter.

A significant part of that loss originated in the company's special situations group, which is known for investing in everything from bankrupt nursing homes to golf courses in Japan. During the quarter, the company was required to mark the value of those assets at currently distressed prices.

The company was also squeezed by its stake in Chinese banking giant Industrial and Commercial Bank of China, whose shares have lost a third of their value through November. Goldman Sachs lost $631 million during the quarter as a result of that investment.

Even as the company slimmed down its balance sheet during the quarter, its exposure to real estate still weighed on results. The company said it suffered a $700 million loss due to commercial real estate loans.

Its investment banking business didn't fare much better. Revenues across that division fell nearly 50% from a year ago due to a big drop in merger activity and stock and debt offerings.

Viniar issued a cautious near-term outlook for the firm to both investors and reporters during separate conference calls held Tuesday morning. But he indicated it was unlikely the company would change its investment banking focus all that much.

"That is what our strategy is and we don't see why it should change," said Viniar.

In late September, Goldman Sachs, and rival Morgan Stanley (MS') converted into bank holding companies, a move that allows them to increase their sources of funding and more directly borrow from the Federal Reserve.

Morgan Stanley, which is expected to report a loss for the quarter on Wednesday, is said to be looking at potential regional bank acquisitions and has hired two retail banking veterans to help with those efforts.

Viniar said that the company is looking to increase its deposit base by $50 billion to $100 billion over the next year through a number of possible avenues, including its wealth management business and brokered certificates of deposit (CDs). He didn't rule out launching an Internet banking operation or acquiring deposits through an acquisition either.

Still, there has been a reluctance by the company to transform into a one-stop bank outfit such as Citigroup (C, Fortune 500) or JPMorgan Chase (JPM, Fortune 500), which offer both retail and investment banking services.