Presidential candidates are criticizing the U.S. Justice Department's lawsuit against South Carolina's illegal immigration law ahead of next week's debate on national security issues.

The department on Monday challenged a law that takes effect in January that would require police to call immigration officials if they suspect the person they've stopped for other reasons is in the country illegally. South Carolina Gov. Nikki Haley signed the legislation into law in June.

Texas Gov. Rick Perry said in a statement he supports the measure because the federal government isn't enforcing border laws.

Minnesota Rep. Michele Bachmann said she supports Haley's efforts because President Obama has failed to achieve border security.

GOP hopefuls will debate national security issues Nov. 12 in Spartanburg.