(ShareCast News) - S&P Global upgraded mining company Anglo American's long-term debt to 'BB+' from 'BB' and raised its South Africa national scale rating to 'zaA/zaA-1 from 'zaBBB+/zaA-2' with a stable outlook for both.The rating actions come after the recent rally in the prices of bulk commodities, including iron ore and coking coal, which led to better-than-expected cash flow for Anglo American in 2016.According to the agency, the free operating cash flows (FOCF), together with the divestments of the niobium and phosphates division and its 9.7% interest in Exxaro would translate into net debt of about $9bn, which is below the company's target of $10bn, and would provide a good starting point for further deleveraging through 2018.The stable outlook reflects the analysts' view that the miner's successful execution of its deleveraging plans would translate into a financial buffer under the current rating.Anglo American shares closed 3.3% higher at 1,224.05p.