The Nassau County jail’s inmate medical provider notified county officials it will pull its operations out of the East Meadow facility in 30 days or less if it doesn’t get a payment of about $2 million by Friday.

Armor Correctional Health Services said in a letter Wednesday to Nassau Comptroller George Maragos it would withdraw from the jail shortly — despite a contract that ends in May — if the county continues to refuse to pay its July and August bills.

“If payment is not received by September 9, 2016 for both the July and August invoices, Armor’s performance under the agreement will be impracticable,” Armor executive Eduardo Bertran wrote.

He said without payment, the company would “terminate the agreement” and put in place “a plan to leave the site as soon as possible,” but no later than Oct. 7.

County Executive Edward Mangano’s office wouldn’t say Thursday what his emergency plan would be for meeting inmate medical needs if Armor walked out.

County Attorney Carnell Foskey said in a statement the administration was “optimistic that a resolution . . . is forthcoming that will render moot the matters raised in Armor’s letter” and was working with Maragos to resolve payment issues.

advertisement | advertise on newsday

Foskey added Maragos would be “subjecting taxpayers to significant liability” and risking the “health, safety and welfare of inmates” if he didn’t pay Armor.

Starting in July, Maragos refused to pay Armor’s monthly bills of about $1 million until the company provided data showing it was meeting contract performance goals.

The comptroller’s stance started after New York Attorney General Eric T. Schneiderman filed a lawsuit against Armor claiming the company has provided “dangerously inadequate” care to Nassau inmates while continuing to collect millions in public money.

The lawsuit also claims county officials had failed to enforce performance terms of Armor’s contract.

The state Commission of Correction has found Armor has provided deficient care in connection with five Nassau inmate deaths since the company first won a Nassau contract in mid-2011. The oversight agency now is investigating the deaths of the six inmates who died in Nassau custody this year, including one death on Monday.

Armor has defended its medical practices, and said in a statement Thursday its focus was on employees “who have been through an inordinate amount of stress due to the decision of certain parties to politicize a very necessary service to a patient population of need.”

It added Armor feels due to Maragos’ actions “it is in the best interest of all parties to afford another entity the opportunity” to provide the Nassau jail’s medical care.

The company recently said it wouldn’t put in a bid for a new jail contract after Mangano’s administration released a request for proposals earlier this year.

Maragos said in a statement Thursday “it will not work” if Armor’s letter “is intended to intimidate” him into making payments, and suggested the county should sever its Armor ties and “not take the risk of more inmate deaths.”

Maragos later told Newsday Armor’s July bill could be paid by Friday, but its August bill still was under review and wouldn’t be paid until “possibly in the next one or two weeks.” However, he also expressed optimism the conflict would be resolved without an Armor walkout.

advertisement | advertise on newsday

Nassau Sheriff Michael Sposato said if Armor left, the health contract wouldn’t revert to Nassau University Medical Center — a publicly-funded facility and the jail’s previous medical provider.

He said NUMC’s top official, Victor Politi — a former Mangano administration appointee — told him there wasn’t enough hospital staff to handle the work.

“That’s why I’m working on getting the comptroller and everyone to get on the same page to pay them . . . because they need to be here to have a transition,” Sposato said of Armor.

He said county officials started meeting with new jail contract bidders Wednesday, but selecting a new vendor was “still a long process.”

County Legis. Laura Curran (D-Baldwin) said the county “would not be facing this crisis” if Mangano’s administration “had consistently held Armor accountable.”