NEW YORK (TheStreet) -- Oversupply has sunken oil prices to five-year lows, and it is taking a toll on oil giant BP (BP - Get Report) , which Tuesday announced a fourth-quarter loss of $4.4 billion.

Nevertheless, investors are breathing a sigh of relief.

Like several oil majors that have announced large capital expense cuts to remain solvent, BP said that it plans to slash expenses by 20%. Will it be enough to sustain long-term profits?

The company included in its loss a $5 billion write down on the value of its inventories, which spiked after the price of Brent crude plummeted about 50% last year.

When not including the effect of falling oil prices, the company said that its fourth-quarter loss was $969 million, reversing last year's $1.5 billion gain.

"We have now entered a new and challenging phase of low oil prices through the near and medium term," said Bob Dudley, the company's chief executive. "Our focus must now be on resetting BP, managing and rebalancing our capital program and cost base for the new reality of lower prices, while always maintaining safe, reliable and efficient operations.

As part of managing and rebalancing its capital program, BP said that it will reduce exploration expenditures and postpone some projects, initiatives that is said are among plans to cut 2015 costs by $4 billion to $6 billion.

This adds to BP's downsizing and streamlining plans, which included various divestment plans worth an estimated $5 billion.

The company also said Tuesday that it took a fourth-quarter charge of $477 million related to the 2010 Deepwater Horizon oil spill in the Gulf of Mexico, bringing total charges for the disaster to $43.5 billion.

In addition, the company said that its replacement cost profit from Russian integrated oil company Rosneft (RNFTF) , in which BP owns a 19.7% stake, plummeted 57% to $451 million in the fourth quarter, compared with $1.1 billion a year earlier.

Analysts polled by The Wall Street Journal were looking for a fourth-quarter replacement cost profit of $1.57 billion, or a 44% year-over-year decline.

Replacement cost profit is a common accounting measure in the oil industry that takes into account the fluctuations in the price of oil. 

Rosneft accounts for 8% of BP's replacement costs profits. And in this case, conflicts in the Ukraine and the resulting European- and U.S.-imposed sanctions have taken a much bigger toll than analysts expected.

BP shares were up more than 2% on the news in pre-market action. And its shares, which are up 4.5% year to date, have been one of the surprises in the energy sector, besting both the Dow Jones Industrial Average (down 2.59%) and the S&P 500 (down 1.85%).

With some uncertainty now removed and BP's aggressive capital expenses cuts, investors appear relieved, especially because the company's dividend yield of 6.02% remains intact.

But oil prices, which are at $51.21 per barrel, need to stay well above $50 per barrel for several quarters before investors can feel comfortable. And analysts aren't ready to predict that this will happen.

Follow @Richard_WSPB

This article is commentary by an independent contributor. At the time of publication, the author held no positions in the stocks mentioned.