OLD TOWN, Maine&nbsp- An investment company has agreed to loan Red Shield Environmental and RSE Pulp &amp Chemical $13.6 million to repay the companies’ existing debt and fund the restart of the mill, an attorney representing Red Shield said Monday.

Red Shield and RSE filed Chapter 11 last month and laid off about 160 employees. Company officials blamed recent and significant spikes in material and fuel costs for Red Shield’ s financial troubles. Court documents filed Friday show that liens totaling more than $10 million have been filed against the companies.

A hearing on the financing agreement proposed by Woodside Capital Partners of Massachusetts is scheduled for Wednesday, Aug. 20, at U.S. Bankruptcy Court in Bangor. Woodside lends money to and invests in a variety of companies, including those in distress, Red Shield attorney Robert Keach of Portland said.

No one from Woodside could be reached Monday evening for comment.

“It’ s very much what we were looking for,” Keach said. “If it is approved and goes as planned, this would open the mill. We could have everybody back to work [and] return it to profitability.”

For a while, business at the facility was going well and Red Shield Environmental LLC was profitable in August, September and October of last year, company officials said. The company reactivated a 16-megawatt biomass boiler, and Red Shield’s tenant, RSE Pulp, brought the 200,000-ton hardwood kraft pulp mill back to full production, according to company officials.

The boiler burns a mix of green wood and construction and demolition debris to produce power to be sold to the power grid and to operate the mill.

Before filing for bankruptcy, RSE Pulp &amp Chemical LLC was in the process of converting its pulping operation to manufacture dissolving pulp, which is sold as rayon and is used principally for clothing. Rayon competes with, and negates the need for, petroleum-based clothing material and is an important fabric in the expanding Asian market because it does not retain body heat and also acts to wick moisture from the body, according to a press release from Red Shield at the time the companies filed Chapter 11.

The facility in Old Town will eventually be converted into a plant for ethanol production, company officials have said in previous interviews.

If approved, Red Shield and RSE will use the money from Woodside to repay previous lenders, such as Chittenden Bank of Burlington, Vt., and the Finance Authority of Maine, among others seeking payment.

The new financing also would provide start-up and working capital to restart and operate the mill and related operations and would allow employees to return to work, according to court documents.

Any objections must be filed with the court by Aug. 13.

Meanwhile, a separate hearing is being held in Bangor at 1 p.m. today to give Red Shield permission to operate the mill in idle mode for the next two to three weeks in anticipation of a start-up after the August hearing.

The new funding from Woodside Capital wouldn’ t change the administrative structure of Red Shield, and a reorganization plan still needs to be completed, Keach said.

“Whether there will be changes down the road remains to be seen,” he said.

Red Shield’s future looked bright just two months ago when the company announced it had received a $30 million grant from the U.S. Department of Energy.

That money, however, can’ t be used to address the cash-flow situation or to replenish the company’s supply of wood chips. The grant was awarded to RSE Pulp, a division of Red Shield Environmental, to continue a partnership with the University of Maine and American Process Inc. of Atlanta, Ga., to build the ethanol production pilot plant using the existing pulp manufacturing process.

If the proposed financing is approved, that project will continue as planned, Keach said.