HELENA, Mont. (AP) – A Montana judge has blocked part of a voter-approved law that requires proof of citizenship or legal standing to receive state services, but he left most of it intact to "preserve the intent of the people."

The law approved overwhelmingly by voters in November requires a person to provide proof that he or she is eligible for services from unemployment benefits to crime-victim assistance.

Immigration-rights attorneys challenged the law in December, saying Legislative Referendum 121 violated constitutional rights to privacy, due process and equal protection.

They said it requires state agencies to determine who is an illegal immigrant and turn them over to federal authorities. They asked District Judge Jeffrey Sherlock of Helena to issue an injunction that would block the entire law while the lawsuit is heard.

Sherlock said in his Tuesday decision that it is unreasonable for individuals to expect to receive state benefits without showing their eligibility. If it results in an immigration proceeding against a person, that would be undertaken by the federal government, not the state, which would not be a violation of privacy, Sherlock ruled.

However, Sherlock said the state may not use the Systematic Alien Verification for Entitlements program to verify a person’s immigration status, a program that LR 121 specifies as a check. The Department of Homeland Security has prohibited use of that program to conclude an individual is violating U.S. immigration law.

But because the law says a person’s status can be checked by "any other lawful method," Sherlock upheld that portion of the initiative.

Sherlock also blocked enforcement of the law’s definition of "illegal alien."

It defines an illegal immigrant as a person who is not a citizen of the U.S. or remains unlawfully in the U.S.

Sherlock ruled there are circumstances in which an individual can enter the country illegally but remain lawfully. Plaintiffs’ attorney Shahid Haque-Hausrath submitted affidavits from eight immigrants who crossed the border illegally but have since won legal residency and are living in Montana.

Aside from the verification checks and the partial block of the definition of illegal alien, the rest of the law can remain intact for now, Sherlock ruled.

"The court finds that it can enter the orders mentioned above and preserve the intent of the people as evidenced in LR 121," Sherlock wrote.

State Department of Justice spokesman John Barnes said the ruling allows essentially all of the law to remain in effect.

"Eighty percent of Montanans voted to ensure that state benefits go only to those who are eligible to receive them, and the judge’s ruling allows the state to implement the peoples’ will," Barnes said in an email Thursday.

Plaintiffs’ attorneys considered the ruling a partial victory.

The partial injunction "now alters the manner that the state can apply the law while this lawsuit is pending. Meanwhile, the remainder of the litigation continues forward," Haque-Hausrath said in a statement.

A motion by state attorneys to dismiss the case is pending.