There is an old saying that hard times reveal true friends. The current situation in Puerto Rico is such a time and as bond insurer AMBAC Financial Group(AMBC) - Get Report has learned, not all investors are friends even if they are shareholders.

Canyon Capital, a hedge fund that holds a 4.5% position in AMBAC, which makes it one of the larger AMBAC shareholders, appears to have turned on its investment. Several weeks ago Canyon embarked on a campaign to shake up AMBAC's management by taking aim at Chief Executive Officer Nader Tavakoli's pay and transparency. Canyon claimed Tavakoli's capital investment plan lacked transparency and his pay, relative to the company's share price, was "extravagant."

As any investor that has examined AMBAC's share price probably realizes, the potential bankruptcy of Puerto Rico has torpedoed the stock (this is also true of other monoline insurance companies that have guaranteed Puerto Rico's municipal bonds). In other words, expectation has become in some case reality with the market pricing the bad news in even as Congress attempts to resolve the crisis in Puerto Rico.

The logical question is, why, as a shareholder of AMBAC, would Canyon look to challenge it rather than work with the company? Could there perhaps be another reason why Canyon has started to speak out against AMBAC and Tavakoli?

As progress has been made in the case of Puerto Rico and bankruptcy, the Congressional fix, which leans heavily on Republican backed restructuring plans, favors many creditors above general obligation bondholders. AMBAC insures more than $2 billion of municipal bonds issued by the government of Puerto Rico and a large percentage of that exposure is to COFINA sales tax bonds. COFINA bond holders have been supportive of legislation that restores order in Puerto Rico. Canyon Capital, however, is a holder of general obligation bonds issued by Puerto Rico, which means it is at odds with AMBAC and other bondholders over the proposed fix that is gaining traction.

Canyon is far from alone in these general obligation bonds. There are a number of firms, including Fir Tree, Monarch Alternative Capital, Stone Lion Capital Partners, and Canyon that snapped up a piece of the $4.5 billion of bonds Puerto Rico has to pay ahead of other obligations. According to Barclays PLC, those funds hold roughly "30% of Puerto Rico's obligations and its agencies." Hedge funds are spending millions to kill the current legislation in Congress because they prefer a Chapter 9 scenario where their general obligation bonds are protected.

In addition to the general obligation bonds, Canyon has threatened to embark on a proxy fight in response to "Ambac's failure last year to negotiate a restructuring of $3.4 billion accrued outstanding deferred payment obligation (DPO) claims against the AMBAC assurance segregated account." A potential fallout of such a proxy fight would be faster payouts on the DPOs owed by AMBAC.

Canyon is also rumored to be running the campaign in an attempt to speed up a payout of deferred policy obligations (DPOs) it is owed by AMBAC. Per Debtwire, the issue here is "diverting excess capital from the general account to DPO holders threatens the coverage available for insured Puerto Rico creditors, whose wrapped bonds trade on the risk that Ambac won't be able to cover policy claims stemming from the commonwealth's anticipated debt restructuring."

Again, the question is, why?

Considering that Canyon holds $28.3 million in AMBAC shares compared to $500 million in DPO claims and GO bond holdings, it's not that hard to figure out the company's motivation. A winning scenario for would be for be for Canyon to cash out of its DPOs, kill the legislation in Congress, and leave AMBAC shareholders holding the bag. Any loss Canyon would take on its AMBAC shares would pale in comparison to its gains on the DPO payouts and general obligation bonds in Puerto Rico.

While hedge funds aren't known for being friends of the companies they invest in, they have been known to hedge their investments even if it means betting against them.

This article is commentary by an independent contributor. At the time of publication, the author held no positions in the stocks mentioned. Versace manages a portfolio that owns shares in FB.

Follow Chris Versace on Twitter and Facebook.