You win some, you lose some. Fresh from his triumph in securing the repeal of “don’t ask, don’t tell”, Barack Obama suffered defeat in the US senate on the weekend when Republicans succeeded in preventing a vote on an immigration reform bill.

His tax and stimulus deal with the Republican leadership has also run into trouble, and ratification prospects for the New Start arms control treaty with Russia look increasingly dim.

If legislation is as difficult as this with the old, Democrat-controlled congress, it’s a bad sign for the prospects of the president’s legislative program next year. The new congress, which takes office on January 3, will have a large Republican majority in the house of representatives and a much narrower Democrat edge in the senate.

Obama’s party currently has a senate majority of 58 to 42 (after January 3 that comes down to 53-47), but to force a vote on legislation requires 60 votes. Allowing gays to serve in the military is now sufficiently popular that it drew across enough Republican votes to break a filibuster: the final vote was 65 to 31.

Immigration reform, however, went the other way, with the familiar alarmist rhetoric of “illegals” and “border security”. Five Democrat senators voted with the GOP and only three Republicans supported the vote to end debate, which failed 55 to 41. Arms control is an even more difficult proposition, since ratification of treaties requires a two-thirds majority, or 67 senators.

This tells us what we already knew: that Republican opposition was making life difficult for Obama well before last month’s mid-term elections, and those elections confirmed and worsened an existing deadlock rather than creating a new one.

But it’s also interesting to take the latest votes as an indication of where the Republican party is going, and what that might say about its tactics over the next two years — including, crucially, the sort of platform it will take into the 2012 presidential election.

All the talk this year has been about the Tea Party — the supposed grass-roots Republican movement, fighting for an end to Washington’s politics-as-usual and a return to fiscal discipline, individual liberty and respect for the constitution.

If the Tea Partiers were really libertarian in inspiration, here was an ideal chance to prove it. “Don’t ask, don’t tell” was an archetypal infringement of personal freedom, an expression of bigotry without any rational justification. The Tea Partiers, who have no qualms about going against the party’s leadership on other issues, could have backed repeal with a clear conscience.

Of course they did no such thing. The Republicans who crossed the floor to ensure repeal were not Tea Partiers but their enemies, traditional Republican moderates such as Scott Brown and Susan Collins.

The vote on immigration reform was, if anything, more striking. Not so long ago, it was Republicans who were most likely to push for amnesty measures on unauthorised immigrants. Ronald Reagan approved a comprehensive amnesty in the 1980s, and George W Bush and John McCain argued for similar measures.

Now, however, the nativists have got the upper hand: it’s all about “enforcement” and against any “amnesty for law breakers”. Not surprisingly, a movement fuelled by anger against the very idea of a black president shows little tolerance for other minorities.

So the drive to the right that the Tea Party represents has not, on the evidence so far, made the Republicans care any more about individual freedom, but rather the reverse.

And there lies the Democrats’ biggest hope for 2012: that, despite its success in the mid-terms, the GOP has failed to learn the lesson of its 2006 and 2008 defeats. Demographics are not being kind to nativist politics, and alienating the fastest-growing segments of the population — the Hispanics, the young and the well-educated — looks like a losing strategy.

But as they gravitate more and more to the wild reaches of the right inhabited by Sarah Palin and the Tea Partiers, the Republicans seem increasingly unable to contemplate any alternative.