During 2013, Ecopetrol (NYSE: EC) fell out of favor with investors, declining around 50% from the high reached at the beginning of the year, and nearly 30% during the last two months of the year. That being said, Ecopetrol is not alone: All oil and gas majors, including industry behemoths Chevron (CVX 1.04%) and ExxonMobil (XOM 0.23%) underperformed the market last year. However, Ecopetrol's declines were among the sector's biggest, and the fall now leaves the company offering an 8.2% dividend yield. So, it is time to take a look?

Volatile operating environment
One of the reasons behind Ecopetrol's recent declines is investors' concern about the stability of its home country, Colombia. Ecopetrol is effectively Colombia's national integrated oil and gas company, accounting for 60% of total Colombian petrochemical activity, and the Colombian government is the largest shareholder of Ecopetrol. Now, investors are worried about the recent political developments within Colombia, including the recent move by the government to jail political adversaries, there is also speculation that the government is going to try to replace well-respected CEO, Javier Gutierrez, which has really hurt sentiment toward the company.

Nevertheless, after seven interest rate cuts within the space of nine months and a surge of government-sponsored stimulus Colombia's economy has been roaring ahead. During the third quarter, the country reported year-on-year GDP growth of 5.1%.

A growing economy should be positive for Ecopetrol's outlook, but the political case is worrying. That being said, Ecopetrol is also involved in exploration and production activities in Brazil, Peru, and on the United States Gulf Coast, so there is some diversification.

But how sustainable is the dividend?
Still, the most attractive thing about Ecopetrol is the company's dividend payout, which currently equates to an annualized yield of 8.2%. Unfortunately, Ecopetrol is, like it major peers, overspending on capital projects, and in my view this does indicate that the dividend could come under pressure.

Ecopetrol is planning on spending $10.6 billion during 2014 on capital projects. $8.4 billion of this will be directly spent on Ecopetrol's projects with another $2.2 billion going toward subsidiary projects. This $10.6 billion budget is an 11% increase on 2013 capital spending levels. Now, Ecopetrol has stated that, assuming the company's crude basket (price achieved for oil sold) remains at levels close to those of 2013 (around $100 per barrel), then Ecopetrol will have to find an additional $1 billion, which the company states could be achieved by "indebtedness."

What do the figures look like?
With Ecopetrol spending more than it can afford on capital projects, it looks as if management is paying the dividend from the company's cash balance. Indeed, at current exchange rates, based in figures from the nine months ending September 30Ecopetrol's dividend cost the company a total of $4.3 billion. As Ecopetrol is already estimating that it will overspend on capital projects by $1 billion for 2014, it would appear that the company is going to have to find at least $5.3 billion in working capital to remain liquid through 2014.

On the other hand, Ecopetrol shouldn't have a problem raising the cash it needs, as at the end of the third quarter net-debt-to-equity was only 9% and net-debt-to-assets was less than 5%. The company's assets are worth $62 billion at current exchange rates.

Following the industry trend
Even though the company is spending more than it can afford, Ecopetrol is not doing anything different from the rest of the industry. In particular, looking at the cash flow statement of ExxonMobil for last year, we can see that the company spent nearly $43 billion on investing activities while only receiving around $47 billion in cash from operating activities. You may say, "well, that's still a $4 billion profit," however, when we consider the fact that ExxonMobil distributed $6 billion to shareholders during the fourth quarter alone, things look different. Meanwhile, Chevron spent $42 billion during 2013 on capital projects and exploration while only taking in $36 billion in cash from operations  .

But to its credit, Ecopetrol has mostly steered away from expansive megaprojects such as Chevron's Gorgon LNG joint venture with ExxonMobil and Royal Dutch Shell, which has seen costs spiral from an initial estimate of $37 billion, projected back in September 2009, to a current figure of $52 billion -- an extra $15 billion is no small change, even for Chevron. What's more, the Kashagan oil field, operated by a consortium of companies including ExxonMobil, Royal Dutch Shell, and France's Total, has seen costs explode during the last decade. From an initial cost estimate of $57 billion for the life of the project, the Kashagan project is now expected to cost a staggering $136 billion over its lifetime -- that's 138% more than originally planned. With Ecopetrol staying out of these projects the company has avoided huge cost overruns.

Foolish summary
So all in all, Ecopetrol's recent declines have been a result of political developments within Colombia. Nevertheless, the company remains committed to growth, and debt levels are low so the dividend payout looks safe for now. Nevertheless, for risk-averse investors Ecopetrol might not be the best option due to its over-reliance on the Colombian economy and the government's large stake in the company.