NEW ORLEANS -- Mexico has joined a legal battle against a Texas law cracking down on so-called sanctuary cities, one of the toughest of its kind in the U.S.

The Mexican government filed an amicus brief Thursday in a lawsuit brought by several major Texas cities challenging the law in federal appeals court in New Orleans.

The brief says the law forces Mexico to treat Texas differently than other states and interferes with diplomatic interests and ongoing negotiations on a range of bilateral issues. The law threatens sheriffs with jail time and removal from office for not cooperating with federal immigration agents.

In September, the 5th U.S. Circuit Court of Appeals in New Orleans allowed Texas officials to partly implement the law while awaiting a full hearing of the appeal in November.