A mechanism for granting state lawmakers their first salary increases in decades was upheld by New York's highest court in a ruling handed down Thursday morning. 

The lawsuit, first filed in 2018, challenged whether state lawmakers and the governor could throw the decision for pay raises for all 213 members of the New York Senate and Assembly to an appointed commission. 

A fiscally conservative legal organization, the Government Justice Center, had contended the commission was an unconstitutional workaround. But in a 4-2 ruling, the state's top judges ruled the commission had the authority to grant the pay raises. 

The pay raise panel "did not exceed its authority under the statute. Accordingly, the order of the Appellate Division should be affirmed," the majority opinion stated. 

The commission was devised on a similar basis to a panel that determines salaries for the state's judiciaries. Ultimately, commission members backed a phased-in pay increase for lawmakers from $79,500 to $130,000.

New York lawmakers now make $110,000 a year, second only to California state legislators who earn just over $114,000. 

The commission also backed pay increases for statewide elected officials, including the governor, as well as members of the executive cabinet who lead state agencies. 

The commission had also recommended limiting outside income for state lawmakers, who could earn money in professional occupations with the Legislature being considered "part time" work.

The court's decision did not cover the question over whether lawmakers should be limited in how they can earn outside income, which was previously struck down.

The issue of outside pay has long been a thorny issue for the state Legislature and good-government organizations. 

The Legislature typically meets in Albany for six months out of the year. 

The panel had been created in part to remove the politically sensitive question of pay raises from members of the Legislature and the governor. Lawmakers had argued the long-standing $79,500 salary was not enough to live on, esepcially in expensive areas of New York state. 

But approving a pay raise directly was considered too unpopular, and legislators were split on whether earning outside pay should be restricted. Ultimately, the commission was devised as a compromise with then-Gov. Andrew Cuomo. 

In dissent, Judge Madeline Singas argued the constitution requires the Legislature to make the decision on its own pay. Judge Michael Garcia concurred.

"Our Constitution’s mandates are clear," she wrote. "Only the legislature may pass and repeal laws, and the legislature itself must fix the salaries of legislators and officers named in the Constitution."