Sen. John McCain (R-Ariz.) seemed uncertain this weekend that a controversial new Arizona immigraiton law would hold up in court.

McCain, who has tepidly supported the law without officially endorsing it, made the comments at a town hall event on Saturday.

Although McCain had sounded a note of support for the bill, calling it a "good tool" for law enforcement, he stopped short of fully endorsing the measure. "I haven't had a chance to look at all the aspects, but I do understand why the Legislature would act," he said. Even though it wasn't clear to him "whether all of it is legal or not," he said state lawmakers "acted out of frustration because the federal government didn't do its job."

The controversy over the law puts McCain in a tough position. Comprehensive (and more moderate) immigration reform has been a signature issue for the Arizonan in the past, but he's now locked in a primary race with conservative Rep. J.D. Hayworth (R-Ariz.).

(h/t: Ben Smith)