On Wednesday, a coalition of U.S. House Republicans and Democrats came within a few votes of passing an amendment to the Defense Appropriations bill aimed at halting the National Security Agency’s bulk metadata collection program. With 111 Democrats and 98 Republicans behind the measure, the vote was one of those rare bipartisan moments that have become nearly extinct since the Tea Party faction of the GOP began to wield influence in the House of Representatives.

But the bipartisan vote had partisan undertones. For some Republicans, the debate still reflects the highly partisan culture in Congress, in which many conservatives register a serious distrust not just of government in general but of President Barack Obama in particular.

In some ways, this strange bedfellows situation emerging around the NSA issue was predictable. The conservative Tea Party movement embraces a more libertarian worldview, while liberal Democrats have been wary of the surveillance state for years. “It’s a funny issue because it’s not partisan at all,” said Rep. Tom Cole, R-Okla., hours before the vote Wednesday, pointing out that the White House and Republican House leadership were on the same side of the issue. “It’s just that eternal debate between liberty and security.”

Many Republicans are open about the fact that they view the NSA program with skepticism because they distrust the Obama administration. “The thing that makes the NSA situation so frightening,” said Rep. Trent Franks, a conservative Republican from Arizona, is “Barack Obama. That’s what causes most of us the deepest consternation.” Franks voted to maintain the program on Wednesday but called it “a very tough vote.”

Distrust of the Obama administration “is profound,” said Rep. Chris Smith, R-N.J, said before Wednesday’s vote. Smith cited a number of issues, including health care reform, where he said the administration has been dishonest. “I see that pattern repeating itself on issue after issue. So fast forward to NSA, the credibility is at best strained if not utterly destroyed.” Smith, who said he was undecided ahead of the vote, ultimately voted to halt the collection program.

When discussing the surveillance issue with House Republicans, claims that the Internal Revenue Service has targeted anti-Obama Tea Party groups comes up often, even though recent evidence suggests the IRS gave extra scrutiny to tea party and progressive groups seeking tax-exempt status. The NSA program is worrisome because “it ties in with the IRS stuff,” Rep. John Fleming, R-La., said earlier this month, arguing that the Obama administration has lacked transparency and oversight. “What the NSA is saying is, ‘just trust us, we’re gonna do the right thing with your metadata.’ Well, we trusted the IRS and what happened?” Fleming voted to halt the program.

“This is an administration that's used enormous power of government agents to oppress and harass U.S. citizens” just like the situation “with the IRS,” Rep. Randy Forbes, R-Va., said at a House Judiciary Hearing last week on the data collection programs. Americans “see this administration using this unprecedented amount of data collection, first in their campaign and then in government, on amounts of data to use for the aforementioned goals.”

Rep. Blake Farenthold, R-Texas, echoed Forbes’ at the same hearing, saying “the fact that this data exists in the hands of the government” concerns him. “We saw what the IRS has done with tax returns, targeting people for political belief.” Farenthold voted for the amendment to halt the program while Forbes voted against it.

The NSA programs revealed by Edward Snowden have become yet another issue that has pitted many of the party’s most conservative members in Congress against party leadership – but it has set up a similar situation for Democrats as well. Wednesday’s amendment, co-sponsored by one of the most conservative and one of the most liberal members of Congress, Michigan Reps. Justin Amash, R, and John Conyers, D, resulted in a majority of the Democratic caucus voting against both the Obama administration and Democratic House leadership. Democrats’ “instinctive reaction would be, ‘let’s be for the president,’ and yet they’re clearly torn over this thing,” Cole said.

After the vote, Conyers, the top ranking Democrat on the House Judiciary Committee, said that the Democratic leadership, including House Minority Leader Nancy Pelosi, D-Calif., had been scared by the vote and put “heavy” pressure on Democrats to vote against it. “A lot of our leadership was involved in making sure that this didn’t pass,” Conyers said.