PHOENIX -- A federal district judge has ruled that one of Maricopa County's most controversial enforcement policies impacting undocumented immigrants must end.

On Friday, Judge Robert Broomfield ruled the county of Sheriff Joe Arpaio must immediately stop its policy of prosecuting unauthorized migrants under the state's human smuggling statute with felonies for conspiring to smuggle themselves.

In 2005, Arizona's state legislature passed a state human smuggling statute that makes it a state felony to transport immigrants in the country illegally for financial gain.

Former Maricopa County Attorney Andrew Thomas interpreted the statute to mean that not only so-called "coyotes" could be prosecuted, but also the the migrants who paid them.

These individuals were arrested by the Sheriff's Human Smuggling Unit, and then were charged with felonies for conspiring to illegally transport themselves.

The prosecutions were suspended under Thomas' successor, interim County Attorney Rick Romley, but resumed under current County Attorney Bill Montgomery.

After these individuals pleaded guilty to the felony charges, typically they were taken into ICE custody and deported. Their criminal record then made them subject to a bar for gaining legal entry to the U.S.

"From the time that that policy was first initiated in Maricopa County, we thought it that it was not only absurd, but it was completely illegal," said Peter Schey, an attorney with the Center for Human Rights and Constitutional Law in Los Angeles, who represented the plaintiffs.

Schey brouht the suit on behalf of a number of organizations, including We Are America/Somos America, and two Maricopa County taxpayers, LaDawn Haglund and David Lujan. Haglund is an Arizona State University professor and Lujan is a former Arizona lawmaker.

The lawsuit has been pending since 2006. Broomfield initially dismissed the case because he found the plantiffs did not have standing to bring the suit, but the Ninth Circuit Court of Appeals overturned that dismissal.

In his Friday ruling, Broomfield found that Maricopa County's policy was preempted by federal law. His order means Maricopa County Sheriff's deputies must stop arresting and detaining suspected unauthorized immigrants if they are not smuggling anyone else, and the County Attorney's office must halt these prosecutions.

The order is the latest restriction from the courts placed on Arpaio's agency.

A different federal district judge, Murray Snow, found in May that the MCSO discriminated against Latino motorists, and Snow is expected to issue a sweeping order in the coming weeks that will require the agency to adopt new policies and procedures to prevent racial profiling.

The plaintiffs in this case were not seeking damages. But there may be more legal action to come.

"We will certainly now examine whether there is any way to undue the approximately 2,000 unconstitutional felony convictions obtained under the Maricopa County policy," Schey said.

Schey also said he hoped it would be possible for those foreign nationals who have already been prosecuted under the policy to convince immigration authorities to lift the bar they face in applying to immigrate legally to the U.S.

The order does not prevent local law enforcement from arresting and prosecuting individuals believed to be smuggling migrants for a profit.

The Maricopa County Sheriff's Office and the Maricopa County Attorney's Office have not yet responded to the Fronteras Desk's request for comment.