New York(CNN Business) The slow death of the American coal industry has forced Murray Energy, the largest private coal miner in the United States, to file for bankruptcy protection Tuesday.

Murray Energy's bankruptcy has been telegraphed for years. It recently failed to make payments to lenders, and the company entered into a forbearance agreement that bought it time to negotiate a restructuring. But that grace period came and went, and Murray Energy was unable to pay its bills. S&P Global Ratings downgraded the company's credit rating to "default" earlier this month.

The coal company formed a restructuring agreement with some of its lenders, representing about 60% of Murray's $1.7 billion in liabilities. The company announced Tuesday it has received $350 million in credit to keep its business operational through bankruptcy.

Robert Murray, the self-proclaimed king of the coal industry, has been replaced as CEO. Murray Energy announced Tuesday that former Chief Financial Officer Robert Moore will take over as the company's new chief executive. Robert Murray will remain as the company's chairman.

"Although a bankruptcy filing is not an easy decision, it became necessary to access liquidity and best position Murray Energy and its affiliates for the future of our employees and customers and our long term success," said Robert Murray in a statement.

The bankruptcy underscores the enormous pressure facing coal miners. A string of coal companies have already filed for bankruptcy, but Murray Energy is among the most powerful and well-connected firms in the industry. Murray Energy and its subsidiaries have 7,000 employees and operate 17 active mines in Alabama, Illinois, Kentucky, Ohio, Utah, and West Virginia.

President Donald Trump's election in 2016 had raised hopes in the coal industry for a revival. The president moved swiftly to slash environmental regulations and even installed a former coal lobbyist to lead the US Environmental Protection Agency. But the deregulatory push has been overwhelmed by market forces. Coal just can't compete with cheap natural gas and the plunging cost of solar, wind and other forms of renewable energy.

Power companies are ditching coal in favor of cleaner alternatives at a rapid pace. US power plants are expected to consume less coal next year than at any point since President Jimmy Carter was in the White House, according to government forecasts released earlier this month.

US coal exports are estimated to have dropped to 20.9 million short tons in the third quarter, according to the US Energy Information Administration. That represents a 28% drop from the same period of 2018. The agency expects coal exports to keep falling, slipping to 17.3 million by the end of 2020.

Mine workers stand to lose in the bankruptcy — not just in jobs but potentially in the erosion of healthcare and pension benefits. Murray Energy is the last major company contributing to the pension plan of the United Mine Workers of America. The pension plan's depleted funding will only get worse if Murray Energy is relieved of its pension requirements.

In August 2017, Robert Murray, a forceful Trump supporter, wrote a letter to the Trump administration urgently requesting an emergency order to protect coal-fired power plants from being closed. In the letter, he warned the White House that failure to issue the order would spark the immediate bankruptcies of his company and a major customer.

"Our time is running out. Please fight for us," the executive wrote in the letter.

However, the Trump administration rejected that cry for help because officials determined there wasn't enough evidence to warrant the use of emergency authority.

In 2017, Robert Murray filed a defamation lawsuit against John Oliver, HBO and CNN owner Time Warner (now called WarnerMedia), alleging "character assassination" during an episode of "Last Week Tonight." That lawsuit was dismissed last year.