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.)

The courts have repeatedly made these fundamental ideas clear. A federal court in 1997 struck down Proposition 187 in California, which would have denied social benefits to illegal immigrants and turned state employees into enforcement agents because it was pre-empted by federal authority. (Appeals in the case were dropped.) The Supreme Court has said federal authority can pre-empt state law when the federal interest is dominant and where there already exists a system of federal regulations. The government has done a poor job enforcing its immigration rules, to say the least, but they do exist, and clearly fall under what the Constitution calls “the supreme law of the land.”