The law that led to a pay commission granting the first legislative pay raise in 20 years can’t be legally split apart, the top legal counsel to Gov. Andrew Cuomo on Friday said in a phone interview.

State lawmakers have argued the compensation commission acted outside of the law’s purview by also capping outside pay for the Legislature as well as largely ending most stipends or “lulus” for leadership posts.

The law is now being challenged the Government Justice Center, which is seeking an injunction to block the raises.

The commission last month backed a recommendation that boosted pay of lawmakers from $79,500 to $110,000 on Jan. 1. Legislative pay will eventually reach $130,000 in the coming years.

Cuomo has backed the recommendations of the commission.

“From a legal prospective I have concerns about the legislative statements that have been made about the commission,” said Cuomo administration counsel Alphonso David.

He pointed to the measure lacking a “severability” clause in its language — essentially that if one portion of the law is struck down, the entire statute could be tossed out.

“The comments that they’re making suggesting outside of their scope can be used as evidence in the case,” he said. “It could result in the entire law being stricken.”

At the same time, a court loss would reset the clock on pay raises for lawmakers, David said, meaning any new salary hike wouldn’t take effect until the Legislature elected in 2020 is seated in 2021.

Meanwhile, several Capitol insiders have raised the concerns that if the law is struck down, the money paid out could potentially be clawed back.