Investors in state-owned companies have always had to deal with political risk in their investments -- namely, the chance that the government will act counter to the interests of the shareholders of the company. This has primarily been an issue in emerging markets, where state-owned companies still exist. However, the recent trials and tribulations of the U.S.' Fannie Mae (NASDAQOTCBB:FNMA) and Freddie Mac (NASDAQOTCBB:FMCC) show how political risk isn't just an emerging-market phenomenon. Read on, and I'll explain political risk and how Fannie Mae and Freddie Mac provide a good example.

Political risk
For most companies, political risk mainly comes in the form of adverse regulation. With state-owned companies, political risk is a much bigger threat for the regular investor, as the government can force the company to take actions that work against shareholders' interests.

A good example of this is Petroleo Brasileiro SA (NYSE:PBR), also known as Petrobras, which is 48% owned by the Brazilian government and Brazil's Development Bank. It used to be one of the largest oil companies in the world by market cap. With the government owning nearly half the company and the Brazilian minister of finance serving as chairman of the board, Petrobras is controlled by the government and run for the benefit of the government.

Since 2006, the Brazilian government has capped gasoline prices in Brazil and forced Petrobras to import any shortfalls in production and sell those at a loss. This has caused the company's refining division to lose $36.4 billion in the past three years.

Further, in the past few years the government has upped its local content requirement so that 77% of all equipment used in new oil production must be constructed locally. This has been a boost to Brazilian industry directly at the expense of Petrobras, which has to deal with higher prices, shortages, bottlenecks, and lower-quality equipment. The combination of these two factors and mediocre production results has led to a steep drop in shares

PBR Chart

PBR data by YCharts

Political risk can be costly to shareholders.

Political risk in the U.S.
For U.S. companies, the biggest political risk usually comes in the form of regulation, though there are some extraordinary cases such as the Gulf of Mexico shutdown in 2010 or the government suing Standard & Poor's in apparent retaliation for S&P's downgrade of the U.S.' credit rating.

Fannie Mae and Freddie Mac have always been an anomaly on the U.S. markets as two of the few public-private partnerships on the stock market. Shares in both were devastated during the financial crisis when the government had to bail them out.

FNMA Chart

FNMA data by YCharts.

Both have risen nearly 100% this year on speculation that the shares were massively undervalued. However, that assessment depended on the government respecting the ownership stake of minority shareholders. In 2012, in what was called the Sweep Amendment, the government rewrote its 2008 bailout of the housing finance giants to force them to hand over all profits to the Treasury Department, denying any profits to minority shareholders. Star fund managers Bruce Berkowitz and Bill Ackman both have major positions and are suing the government to treat minority shareholders under the original 2008 bailout plan.

But the companies emphasize that their obligation is to the taxpayer, not the common shareholder. As fellow Fool contributor Patrick Morris pointed out yesterday, Fannie Mae notes in its annual report that it is "no longer managed with a strategy to maximize shareholder returns."

Yesterday, the question of whether shareholders are owed anything was called into question when the Senate Banking Committee said it will release a reform proposal in the coming days for the two housing giants that would "wind down Fannie Mae and Freddie Mac" and reform the U.S. housing-finance system. The stocks dropped 50% on the news before recovering to 30% drops for the day and then continued to drop today.

FNMA Chart

FNMA data by YCharts.

Investors in Fannie Mae and Freddie Mac have always taken political risk, but not all investors fully appreciated how expensive it can be. The government has been hinting for some time that it wants to wind down the companies, so yesterday's news shouldn't have been a big surprise. Investors in Fannie Mae and Freddie Mac common shares are reliant on large investors winning their shareholder lawsuits against the government -- or the government changing its mind about the treatment of minority shareholders -- for any potential upside in the stock. Otherwise, the shares are likely worthless.

Bottom line
Investors should realize the risk they take when investing in politically sensitive companies. While you can make money in the short term, the government is not always aligned with investors' interests, which can hurt investors in the long run.

3 Stocks to Buy for the Long Haul
As every savvy investor knows, Warren Buffett didn't make billions by betting on half-baked stocks. He isolated his best few ideas, bet big, and rode them to riches, hardly ever selling. You deserve the same. That's why our CEO, legendary investor Tom Gardner, has permitted us to reveal "The Motley Fool's 3 Stocks to Own Forever." These picks are free today! Just click here now to uncover the three companies we love. 

Dan Dzombak can be found on Twitter @DanDzombak or on his Facebook page, DanDzombak. He has no position in any stocks mentioned. The Motley Fool recommends Petroleo Brasileiro S.A. (ADR). Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.