A Wasco County circuit judge ruled Friday an Oregon jail's contract with ICE does not violate the state's so-called sanctuary law — but some of the jail's practices do.

A group of Wasco County taxpayers filed a lawsuit in 2017 arguing the Northern Oregon Regional Corrections Facility in The Dalles — known as NORCOR — was violating Oregon's 31-year-old sanctuary law, in part because of the jail's contract with ICE.

THANKS TO OUR SPONSOR: Become a Sponsor

The ruling is the first aimed at defining Oregon's sanctuary law, which limits how much local law enforcement can cooperate with federal immigration officials.

NORCOR is a cinder block jail surrounded by a high chain-link fence and razor wire in an industrial section of The Dalles, Oregon. Conrad Wilson / OPB

The ruling is a significant blow to immigration activists, who turned to the courts as they try to force NORCOR to end its contract with ICE.

Oregon's sanctuary law states that law enforcement can't use local resources to detect or apprehend people whose only violation is being in the United States in breach of federal immigration laws.

"NORCOR is not apprehending, arresting, or seizing federal detainees or inmates as those terms are commonly used or within their ordinary meaning, nor are NORCOR's actions for the purpose of apprehending," Judge John Wolf wrote in his ruling.

He added that ICE detainees "have been apprehended, arrested or seized by ICE prior to arriving at NORCOR."

That argument is what NORCOR has claimed since the lawsuit was filed.

THANKS TO OUR SPONSOR: Become a Sponsor

"On the central and primary issue in this case, the court has ruled that NORCOR’s contract with the federal government does not violate state law," said Derek Ashton, NORCOR's attorney. "Today’s decision ensures that critical funding source will remain in place."

NORCOR is the jail for Hood River, Wasco, Sherman and Gilliam counties and relies on its ICE contract to offset a recent dip in tax revenue. For years, ICE has paid the jail $80 per detainee, per day. In some fiscal years that's translated to $800,000 of the operating budget.

ICE did not immediately comment Friday.

“The ruling said the ICE contact was compliant with our sanctuary law," said Andrea Williams, the executive director of Causa, an immigration rights organization. "We really disagree with what NORCOR is doing in renting out their beds to ICE."

In addition to upholding the jail's ICE contract, Wolf also ruled that NORCOR can notify ICE of foreign-born individuals it books into its jail. Other jails around the state regularly do this.

While Wolf's ruling is largely a setback for immigration activists, he did find NORCOR violated the sanctuary law when it notified ICE about inmates it released. That could have wide implications for other jails that engage in the practice, said Erin Pettigrew, an attorney with the Portland-based Innovation Law Lab and one of the attorneys representing the plaintiffs in the case.

"We are pleased with the Court’s decision that NORCOR is violating Oregon law in some respects, but disappointed by the court’s decision with respect to the ICE contract,” she said in a statement.

Jails across the state notify ICE when they're set to release foreign-born individuals.

In November, Oregon voters overwhelmingly voted to reject a measure that would've scrapped the state's sanctuary law. But until now, the law has never been meaningfully interpreted by the courts.

Recently, the Josephine County Jail and the Springfield Municipal Jail both ended their contracts with ICE.

It's likely some or all of Friday's ruling will be appealed.