The debate about whether to continue the dragnet surveillance of Americans' phone records is highlighting divisions within the Democratic and Republican parties that could transform the politics of national security.

While some leading Democrats have been reluctant to condemn the National Security Agency's tactics, the GOP has begun to embrace a libertarian shift opposing the spy agency's broad surveillance powers — a striking departure from the aggressive national security policies that have defined the Republican Party for generations.

The lines are drawn but not in the traditional way. The Republican National Committee, civil libertarians like Kentucky Sen. Rand Paul and liberals like Massachusetts Sen. Elizabeth Warren are on one side of the debate. Florida Republican Sen. Marco Rubio, Democratic former Secretary of State Hillary Rodham Clinton and the House and Senate leadership are on the other side, defending the Obama administration's surveillance programs as necessary to prevent terrorism.

The split in each party could have practical and political consequences ahead of the 2014 midterm elections and the 2016 presidential contest.

Congress may address government surveillance this spring in one of its last major moves before members head home to focus on the November elections. But if Congress punts the surveillance debate to this time next year, it would resurface just as the presidential primary campaigns are beginning.

At issue is the bulk collection of millions of Americans' phone records, authorized under Section 215 of the USA Patriot Act. Details of the program were secret until June when a former NSA systems analyst, Edward Snowden, leaked classified documents that spelled out the monumental scope of the government's activities. The bulk collection provision in the law is set to expire June 1, 2015, unless Congress acts to renew or change the program sooner.

More than a decade after the 9/11 terrorist attacks, Americans have become less willing to support invasive surveillance tactics in the name of national security. Recent polls show a sharp decline in public support for the NSA programs created under George W. Bush and continued under Obama.

The Obama administration justifies the surveillance program, in part, by pointing to Congress' continued approval and support. But the president also has called for some changes in an effort to win back public trust that would provide more privacy protections and transparency but not end the program completely.

Clinton, the overwhelming Democratic favorite should she seek the presidency, has been virtually silent on the NSA debate for months. Last fall she called for a “full, comprehensive discussion” about the practices but also defended the surveillance: “From my own experience, the information-gathering and analyzing has proven very important and useful in a number of instances,” she said. A Clinton spokesman declined further comment last week.

Paul, a prospective Republican presidential hopeful and tea party favorite, contrasted Clinton's position with his own aggressive opposition to Bush-era intelligence programs, as polls suggest that a growing majority of Republicans — tea party supporters in particular — are deeply skeptical of the federal government.

“I think in 2016 if you had a more libertarian-leaning Republican, and you had someone like Hillary Clinton, I think you could actually completely transform where people think they are and what party people think they have allegiance for,” Paul said at a recent Washington conference. Last week, Paul filed a lawsuit against Obama and others in the administration over the so-called 215 program.

The Republican National Committee in January approved a resolution “to immediately take action to halt current unconstitutional surveillance programs and provide a full public accounting of the NSA's data collection programs.”

There was an immediate backlash from Bush-era Republican intelligence officials who described the resolution in a letter to RNC Chairman Reince Priebus as a dangerous “recipe for partisan oblivion.” Other Republicans also pushed back against the intraparty shift.

Rubio said this week that “we need to be careful about weakening” the nation's surveillance capabilities.

Rubio said Americans' privacy expectations and rights need to be protected. “But we also need an effective surveillance capability,” he told the Tampa Bay Times. “Every other country in the world, certainly those that are hostile to our interests, has robust intelligence programs.”

There was an unexpectedly close vote in the Republican-controlled House last July on a measure that would have ended the bulk collection of phone records. The amendment failed, but it was the first chance for lawmakers to take a stand on the secret surveillance program since the Snowden leaks.

A Pew Research Center poll found last month found that Republicans, fueled by tea party supporters, now disapprove of the program by 56 percent to 37 percent. Democrats are almost evenly split on the program — 46 percent approve and 48 disapprove.

Lawmakers are expected to get another chance to weigh in this spring when Republican House leaders plan to allow a vote on an amendment to a Defense Department bill that would curtail some of the NSA's surveillance authority. If approved, the measure would give GOP members political cover with their party's most aggressive NSA critics.

The Democratic Party, too, faces intraparty divisions, as progressive members are more likely to be aligned with tea party Republicans than Clinton and Obama on this issue.

Warren, a liberal favorite, said that while Obama's proposed reforms were “a significant step forward,” they didn't go far enough. She is among more than a dozen Democratic and three Republican senators who support legislation that would end the 215 program.

“Congress must go further to protect the right to privacy, to end the NSA's dragnet surveillance of ordinary Americans, to make the intelligence community more transparent and accountable,” Warren said in a statement to The Associated Press.

At least one Republican strategist sees a silver lining.

“You want to keep the country safe, and you don't want to eviscerate our liberties and freedoms,” said William Martel, a foreign policy adviser to Republican presidential nominee Mitt Romney's 2012 campaign. “That common sense is pulling Democrats and Republicans closer together on this issue than we expect. Isn't that really the basis of bipartisan consensus?”

___

Peoples reported from Boston. Associated Press writer Connie Cass contributed to this report.