The owners of the Bucksport paper mill, the Maine Attorney General’s Office and the Maine Department of Labor have reached a consent agreement that will give hundreds of laid-off mill workers and their families some financial relief.

A statement announcing the deal Tuesday said at least $18 million will be paid to the more than 500 hourly workers at the Verso Paper mill. The mill was permanently shut down one week ago, leaving the majority of those employees without jobs heading into the new year.

Under terms of the agreement, which was filed Tuesday afternoon in Kennebec County Superior Court, each mill worker will receive half of their severance package on Jan. 8, with the remaining 50 percent of benefits owed them to be paid on the fifth business day after the completion of any sale of the paper mill, or no later than March 19.

Although severance package amounts will vary widely depending on years of service, Julie Rabinowitz, the Department of Labor’s spokeswoman, said the average package for a mill worker will amount to about $15,000. Under the agreement, that package will include payment for unused 2014 vacation days and for 2015 vacation days that would have been owed to workers if the mill had continued operating.

The average hourly wage at the mill is $26. More than 70 percent of the mill workforce is over the age of 50, Rabinowitz said.

“If this had gone to court, it would have dragged on far beyond March 19,” Rabinowitz said. “This agreement gives the workers money upfront and some assurances about future payments.”

Verso’s initial offer after announcing the mill closure and the layoffs was to pay workers their severance pay by no later than April 1, a date based on a provision in union contracts.

Workers objected, citing the financial hardship a delayed payout would have. State officials threatened legal action, pointing out that state law requires that severance benefits be paid in full after workers receive their last paycheck. Mill workers will get their last paycheck Dec. 31.

Rabinowitz said the sides started talking two weeks ago about a compromise, and on Monday, during a bargaining session in Bangor that lasted late into the evening, the sides came to terms. The Attorney General’s Office filed a legal order in court Tuesday that sets out terms and penalties if Verso should fail to comply.

“These workers are due every penny of severance they are owed under state law,” Gov. Paul LePage said in a written statement. “The agreement provides the affected workers with 50 percent of what is owed them up front with legal requirements and penalties if Verso does not meet the deadline for the balance of the payment.”

House Speaker Mark Eves, a Democrat, co-authored a letter with Democratic and Republican legislators that urges Verso to promptly pay severance to its workers.

“I’m glad we were able to come together on a bipartisan basis to stand on the side of workers and send a strong message to out-of-state corporations who might try to skirt our laws,” Eves said in written statement.

Verso spokesman Bill Cohen said the severance dispute was blown out of proportion by the state and unions.

“The whole thing has never been about if we were going to pay severance. It’s been about when,” Cohen said. “Some have tried to portray Verso as the villain, but what has been lost in all this is we’ve always said we want to keep talking. We had our disagreements and we worked through them.”

Duane Lugdon, a spokesman for the United Steelworkers, Local 555, the union that represents about 90 percent of the mill’s workforce, said he was pleased that litigation over severance was avoided.

“The settlement was the product of a difficult and occasionally contentious negotiations where all participants sought to protect their interests,” Lugdon said in a written statement. “This negotiated resolution is superior to litigation, which extends uncertainty for workers who should receive the benefits to which they are entitled.”

LePage said his administration continues to seek an alternate buyer for the Bucksport mill who would continue to operate it as a paper mill.

But that will be a challenge because Verso Paper announced Dec. 8 that it had reached an agreement to sell the Bucksport mill and power generation assets to a subsidiary of Montreal-based American Iron and Metal for $60 million. American Iron and Metal is a scrap metal dealer. The sale is pending.

The laid-off workers are eligible to collect unemployment after the Jan. 8 severance payout and can receive up to 26 weeks of benefits.