Updated

The Department of Justice and other agencies filed a complaint Tuesday in Salt Lake City that challenges Utah's immigration law, saying the state violates the U.S. Constitution due to its attempt to establish a state-specific immigration policy.

The department said the law mandates enforcement measures that can disrupt immigration practices by the federal government in the area. The Justice Department also expressed concern that, under the law, individuals could potentially be harassed and wrongfully detained, according to a statement.

This is the second lawsuit filed against the law. Civil rights groups filed a lawsuit earlier this year, and a federal judge granted a temporary restraining order in May against House Bill 497. That bill requires people arrested for serious crimes to prove their citizenship but gives police discretion to check citizenship for lesser crimes.

Similar lawsuits have taken aim at immigration enforcement in states like Arizona, Alabama and South Carolina.

The Justice Department said it is the federal government's role to enforce federal immigration laws, not local governments.

Attorney General Eric Holder said in a statement that "a patchwork of immigration laws is not the answer and will only create further problems in our immigration system."

The suit was filed on behalf of the Departments of Justice, Homeland Security and State Department.

"This kind of legislation diverts critical law enforcement resources from the most serious threats to public safety and undermines the vital trust between local jurisdictions and the communities they serve," said Department of Homeland Security Secretary Janet Napolitano.

The lawsuit comes after several months of discussions with state officials. The Justice Department said it does not expect the filing to end ongoing negotiations, and since the provisions do not take effect until 2013, the department is hopeful a resolution can be made before it files a lawsuit against the state.

The Salt Lake Tribune reported that Mark Shurtleff, the state's attorney general, said Utah’s law was significantly different from other state laws that were challenged.

"We feel strongly that we made significant changes with our law compared to Arizona’s at the time," Shurtleff said, the paper reported. "We think the way our law is, with our changes, we think we can defend it, that we can prevail on this and have it held constitutional."

The Associated Press contributed to this report.