The Obama administration has not always been completely clear about its immigration agenda, but it was forthright Tuesday when it challenged the pernicious Arizona law that allows the police to question the immigration status of people they detain for local violations. Only the federal government can set or enforce immigration policy, the government said in its lawsuit against the state, and “Arizona has crossed this constitutional line.”

There is nothing terribly complicated about this principle, which is based on several aspects of the Constitution, acts of Congress, and Supreme Court decisions over the years. A patchwork of state and local immigration policies would cause havoc.

As the Justice Department points out in its complaint, the Arizona law will divert resources from the government’s pursuit of dangerous aliens, including terrorists, spies and violent criminals. It will harass authorized immigrants, visitors and citizens who might not be carrying their papers when stopped by the police. It will ignore the country’s cherished protections of asylum and will interfere with national foreign policy interests. (Already several Mexican governors are refusing to meet with their American counterparts in Arizona, a sign of the diplomatic disarray produced by the law.)

I would argue that an unofficial police practice of “reporting all illegal immigrants they encounter,” to federal immigration authorities, although reeking of racial profiling and, as the Globe points out, counterproductive to effective law enforcement, does not touch the preemption issue, since it’s not establishing formal immigration policy. The Arizona law requires police officers to ask for documented proof of citizenship or legal residency on any official contact with anyone they think might be in the U.S. illegally (which is why it’s called the “Show Me Your Papers” law, duh) .