Republican senators eyeing the presidency split over the renewal of the USA Patriot Act surveillance law, with civil libertarians at odds with traditional defense hawks who back tough spying powers in the fight against terrorism.

The political divide will be on stark display this month as Congress debates reauthorization of the post-Sept. 11 law ahead of a June 1 deadline. The broader question of privacy rights has gained attention since a former National Security Agency systems administrator, Edward Snowden, disclosed in 2013 that the NSA had been collecting and storing data on nearly every American's phone calls for years.

On one side, Sens. Marco Rubio of Florida and Lindsey Graham of South Carolina want Congress to permanently reauthorize parts of the law, giving the NSA much of its surveillance authority.

If there were another attack, "the first question out of everyone's mouth is going to be, 'why didn't we know about it?'" Rubio said this week in a speech on the Senate floor. "And the answer better not be, 'because this Congress failed to authorize a program that might have helped us know about it.'"

The rise of Islamic State militants, the continued threat from al-Qaida and the ongoing civil war in Syria have pushed national security to the forefront in the 2016 race for the GOP nomination, with some candidates determined to show their toughness. On NSA surveillance, however, Americans are wary of government intrusion.

Sens. Ted Cruz of Texas and Rand Paul of Kentucky say the law infringes on citizens' privacy.

"They want nothing more than to keep the national security spy state growing until it tracks, traces and catalogues virtually every detail about every aspect of our lives," Paul said in a campaign email to his supporters. "Once government bureaucrats know every aspect of our lives — what we watch, what we buy, what we eat, where we worship — it won't be long until they try to run them 'for our own good.'"

Under the law, the NSA collects information on the number called and the date and time of the call, then stores it in a database that it queries using phone numbers associated with terrorists overseas. Officials say they don't use the information for any other purpose, and that the legal powers that enable the program are essential to the hunt for terrorists. Opponents say the seizure and search of telephone company records violates Americans' expectations of privacy under the Fourth Amendment.

Adding a wrinkle to the debate was Thursday's federal appeals court ruling that the bulk collection of Americans' phone records is illegal. The court all but pleaded for Congress to sharpen the boundaries between security and privacy rights.

The House is slated to vote next week on a bill to reauthorize the law while also ending the government's dragnet collection of records, and Cruz has endorsed the measure, saying it "strikes the right balance between privacy rights and national security interests."

But Senate leaders, including Majority Leader Mitch McConnell, R-Ky., and Sen. Richard Burr, R-N.C., the chairman of the Intelligence Committee, have spoken forcefully for a competing measure to reauthorize the law as-is.

Across Congress, the political divisions cut along complex lines. Libertarian-leaning Republicans like Cruz and Paul are aligned with many liberal Democrats, insisting that a secret intelligence agency should not be storing the records of every American phone call. But other Democrats and Republicans say the program is needed now more than ever given the Islamic State group's determination to inspire terrorist attacks on American soil.

Graham, the only one of the four who has not formally announced his candidacy, is siding with Rubio in favor of the NSA's spy powers but competing with him for support among defense hawks.

"I'm open-minded to doing reforms," Graham told reporters Thursday. "I just don't want to diminish the capacity of the program to prevent another 9/11. I believe if the program were in operation before 9/11, we probably would have prevented 9/11."

Sen. John McCain, the GOP's 2008 presidential nominee, previewed one likely argument. He cited the incident in Texas last Sunday in which two gunmen were shot dead while trying to attack a provocative event that featured cartoon images of the Prophet Muhammad. In the aftermath, authorities described an alarming trend involving potential homegrown extremists with access to social media and possible exposure to Islamic State group propaganda.

"We must do everything in our power to stop these attacks before they happen," McCain, the Senate Armed Services Committee chairman, said.

FBI Director James Comey said Thursday that although the bureau had opened a new investigation into one of the gunmen, Elton Simpson, agents had no reason to believe he was going to attack the event.

___

Follow Laurie Kellman at www.twitter.com/APLaurieKellman