Updated

Massachusetts violated the constitutional rights of legal immigrants when it barred them from a state-subsidized health care program, ruled the state Supreme Judicial Court on Thursday.

The court said in a unanimous decision that denying legal immigrants access to the program amounted to discrimination and a violation of their constitutional rights.

The Legislature voted in 2009 to block immigrants from the program, seeking to save about $130 million.

Gov. Deval Patrick later created the Commonwealth Care Bridge, a markedly scaled down program that provided basic health care for some 20,000 legal immigrants who previously had been covered under Commonwealth Care. The immigrants lost access to other services and faced much higher co-pays.

“The discrimination against legal immigrants ... violates their rights to equal protection under the Massachusetts Constitution,” Justice Robert Cordy wrote for the court in a unanimous ruling. “We recognize that our decision will impose a significant financial burden on the Commonwealth ... If the plaintiffs’ right to equal protection of the laws has been violated by the enactment of [the law], then it is our duty to say so.”

“Fiscal considerations alone cannot justify a State’s invidious discrimination against aliens,” Cordy wrote, arguing that lawmakers had presented limited other justification for their action.

“Fiscal considerations alone cannot justify a State’s invidious discrimination against aliens."

— Massachusetts Supreme Judicial Court Justice Robert Cordy

It was under then-Gov. Mitt Romney, viewed as the likely GOP nominee for the presidential election in November, that qualifying legal immigrants were able to participate in the Commonwealth Care program, which was part of his 2006 health care reform law.

Several other states also have stripped benefits for legal immigrants as they looked for ways to cut costs during the recession. Opponents to the cuts mounted court challenges, accusing them of discriminating against immigrants who had played by the rules.

In New Jersey, for instance, the Legislature allowed the Department of Human Services to end a health insurance program for thousands of low-income legal immigrants who could not qualify for Medicaid, which requires that foreign-born residents have at least five years of living in the United States. The Legislature made the move as state officials looked at ways to reduce costs.

The Center for Social Justice at Seton Hall University’s School of Law sued on behalf of six legal immigrants who lost their coverage, but last year a New Jersey appellate court panel ruled that the Legislature was not wrong to drop legal immigrants from the program.

One of the attorneys said of that decision: “The effect of it is to single out hardworking lawful immigrants for denial of critical health care benefits solely because they are immigrants.”

In Massachusetts, Health Law Advocates, which filed a lawsuit on behalf of immigrants, praised the high court ruling.

“This is a major victory for legal immigrants in the commonwealth, no question about it. It vindicates their constitutional right to equal protection,” said Matt Selig, executive director of Health Law Advocates. “Our expectation is the legislature will provide the funding to enable them to enroll in Commonwealth Care.”

A spokesman for Gov. Deval Patrick's office said the administration would have a statement later Thursday.

This story contains material from The Associated Press.

Follow Elizabeth Llorente on Twitter: @Liz_Llorente

Elizabeth Llorente can be reached elizabeth.llorente@foxnewslatino.com

Follow us on twitter.com/foxnewslatino
Like us at facebook.com/foxnewslatino