A judge has confirmed Verso Corp.’s bankruptcy reorganization plan, clearing the way for the beleaguered papermaker to emerge from bankruptcy.

Judge Kevin Gross of the U.S. Bankruptcy Court in the District of Delaware signed the confirmation order Thursday, less than five months after Verso and its subsidiaries filed for bankruptcy protection in late January under Chapter 11 of the U.S. Bankruptcy Code. If Verso follows the reorganization plan as written, all of its pre-bankruptcy debts will be erased.

While complex, the plan’s centerpiece is to issue shares of stock to creditors in lieu of cash repayment. New common stock will be issued to creditors that were owed money by Verso and its NewPage subsidiary before the bankruptcy. When that happens, Verso also must take the necessary steps to have its shares once again listed on the New York Stock Exchange. Verso’s stock was delisted in September because its share price fell below the required $1 minimum.

The company said in a news release Thursday that it expects to emerge from bankruptcy by the end of July.

“Verso is extremely pleased with this speedy and successful outcome,” President and CEO David Paterson said in the release. “Our smooth path through this critical step in the restructuring process would not have been possible without the strong support of our funded debt holders and the Official Unsecured Creditors Committee and the affirmative vote on our plan of reorganization by our creditors.”

Verso, which employs roughly 500 people at its Androscoggin mill in Jay, filed for bankruptcy in Delaware on Jan. 26 to eliminate $2.4 billion of debt. Verso is headquartered in Tennessee but incorporated in Delaware.

In the bankruptcy filing, two Maine companies were listed among Verso’s 30 largest creditors. Catalyst Paper Operations Inc. of Rumford was owed $2.2 million and Hartt Transportation Systems Inc. of Bangor was owed $1.2 million. The master list of creditors filed by Verso included the names of 30,785 businesses and individuals to whom the company owed money.

Verso had struggled financially in the years leading up to the bankruptcy. It sold off its unprofitable Bucksport mill in 2014, eliminating 500 jobs. The move was part of a complicated $1.4 billion deal that involved the acquisition and then sale of the former NewPage mill in Rumford in January of last year. That mill is now owned by Canada-based Catalyst Paper.

At the conclusion of the NewPage deal, Verso had about $3.5 billion in annual sales and about 5,800 employees in eight mills across six states. In its bankruptcy filing, the company reported gross revenues of about $2.4 billion for the first three quarters of 2015.

On June 6, Verso announced that Paterson would be stepping down after the conclusion of the bankruptcy. That same day the company said it was raising another $575 million to help it pay transaction costs associated with the bankruptcy. As a result of the reorganization, the company said it expects to have a stronger credit profile and increased financial flexibility.

The company also said in its SEC filing that it will seek a product mix of more profitable grades of paper, such as specialty grades, post-bankruptcy. Verso, the largest North American coated paper producer, did not specify in the filing which mills would be reconfigured, if any, to boost capacity of specialty paper.

The Androscoggin mill in Jay produced about 71,800 tons of specialty paper in 2015, roughly 12 percent of the mill’s total production volume of 598,000 tons, according to the filing. By comparison, the mill produced about 293,000 tons of coated groundwood paper, or 49 percent of total production volume. Coated paper is the glossy paper used in catalogs and magazines.

One of the Androscoggin mill’s three coated paper machines and a pulp dryer were taken offline in late 2015, resulting in the loss of about 300 jobs, or roughly one-third of its workforce at the time.