Before their Denver extravaganza last week, Democrats feared their nominating convention might dissolve into a gruesome riot of intramural conflict. The primary season wounds between the Clinton and Obama camps had not fully healed and some feared open fighting between the factions would overshadow Barack Obama's coronation. But after a somewhat unsure start, they averted disaster. Bill and Hillary Clinton both rallied their supporters to Obama's side with full-throated endorsements. And then came Obama's stirring acceptance speech, with which virtually no dazzled Democrats could find fault. For the Democrats, it was mission accomplished.

In truth, the talk of division was overblown. As Time magazine's Amy Sullivan recently noted, today's Democratic party is as unified as it has been in a generation. The long-running feud between the party's moderate and liberal wings is dormant, with the liberals holding sway. Consensus reigns on nearly every key policy question, from leaving Iraq to ending George W Bush's high-income tax cuts to putting brakes on unfettered free trade.

But look who's divided now: the Republicans. As John McCain heads for St Paul this weekend - with his photogenic but almost comically inexperienced running mate, Sarah Palin, in tow - it is the GOP that struggles to find real unity. John McCain now leads a party saddled with fierce internecine disputes about everything from civil liberties to budget policy to America's role in the world. While these Republicans may lack a soap opera akin to the Clinton-Obama psychodrama, their ideological stitching has come dangerously loose. It is McCain's challenge to ensure that the seams don't burst open before election day.

How times have changed. During the first half of the Bush era, the Republican party brooked about as much dissent as the North Korean Communist party. But nothing breeds division like failure and the collapse of Bush Republicanism has a long list of party factions pointing the finger at one another.

Take social policy. The apex of Republican power earlier in this decade was made possible by the enthusiasm of Christian conservative voters reacting, in part, to the alleged moral decay of the Clinton presidency. But once-reliable white evangelical voters are growing more disaffected with the Republicans. They have not been rewarded, after all, with a federal ban on gay marriage or real progress towards outlawing abortion. Nor do they have much trust in McCain, who has never prioritised social issues in his career and has clashed with the religious right. Earlier this year, influential Christian leader Dr James Dobson vowed that: 'I cannot and I will not vote for John McCain.'

McCain's stunning choice of Alaska governor Sarah Palin, merely two years into her first term and reportedly a visitor to just one foreign country (Ireland) before 2007, was a step towards calming evangelicals: Palin might be unqualified for the job, but she has a solid record of social conservatism, particularly on abortion. (Senior party leaders, including Karl Rove, had to plead with McCain not to choose a pro-abortion rights running mate, such as Connecticut senator Joe Lieberman or former Pennsylvania senator Tom Ridge, lest open warfare result.) But a dangerous breach remains. Socially moderate Republicans are seeking to assert themselves. The GOP's Wall Street financial base has little interest in banning abortion or gay marriage and, indeed, sees those crusades as a path to electoral exile. Hence, evangelicals in St Paul will be subjected to a Tuesday night keynote speech by the former New York mayor and presidential candidate Rudy Giuliani, who urges his party to be more accepting of abortion. Listen for the boos - their volume will hint at whether religious conservatives understand that to prevail in November McCain needs to appeal beyond the Republican party's shrinking base, or whether they will insist on self-destructive displays of radicalism.

Foreign policy? The realist wing of the GOP wants to beat back the influence of the neoconservatives such as William Kristol who led the 2002-2003 charge into Iraq. This battle has played out in editorial pages, at Washington think-tanks and reportedly among factions within McCain's advisory circle. So far, the neocons seem to be winning out, as McCain rattles his sabre at Iran and Russia and puts a heavy emphasis on democracy promotion. But McCain's tough talk does not come without a cost, as evidenced by the warm words for Obama from leading foreign policy moderates such as Nebraska senator Chuck Hagel. Some GOP leaders even fear that former Secretary of State Colin Powell, aghast at neocon foreign policy influence, might not endorse McCain - and could possibly even proclaim his support for Obama in a public relations disaster for the Republican nominee.

Meanwhile, those on the party's growing neo-isolationist fringe can rally around the libertarian hero Ron Paul, whose failed presidential primary campaign was largely premised on his opposition to the Iraq War and which drew support from many traditional conservatives. Unwelcome inside the Xcel Centre, Paul will stage a rally across the river in next-door Minneapolis. By comparison, anti-war protesters were a negligible force in Denver.

McCain's message in St Paul will also be muddied by the presence of another libertarian, Bob Barr, a former Republican congressman now running a third-party candidacy. A quirky character memorable for having been tricked by Sacha Baron Cohen's Borat into believing he had eaten breast-milk cheese, Barr is reinventing himself as the champion of principles that he says the Republican party has betrayed. Barr emphasises the erosion of civil liberties through such measures as expanded government eavesdropping powers, which McCain supports, and says the Republican party has been corrupted by lobbyists. Many analysts agree that his candidacy will draw conservatives from McCain's base. Barr may cause his pro-Republican home state of Georgia to become competitive, a nightmare for McCain. McCain can still win in November - barely. But in a poisonously anti-GOP political climate, he cannot allow votes to leak from his party's conservative base.

For now, none of these fissures threatens to tear the Republican party apart completely. But from Obama's perspective, they don't need to. All they have to do is leave Republican voters uninspired on election day. Consider the contrast in how last week ended. Obama spoke before 80,000, while McCain struggled to round up 10,000 voters for his vice-presidential announcement rally in Ohio. This is a stark illustration of the 'enthusiasm gap' which threatens to doom McCain in November, should Democrats turn out in droves while Republicans stay at home.

For McCain, there really is no good solution to this dilemma. Republican factions will have to hash out their differences over time. Thus, Republicans will feel pressure to cast the spotlight on to Obama. They will seek to rally their balkanised party around a menacing vision of Obama as dangerously inexperienced, willing to put his ambition ahead of the national interest and an elitist with disdain for ordinary Americans. (Should that last part come with an ugly implication that Obama himself is foreign and un-American, well, so be it.)

If you find yourself hearing quite a lot about what's wrong with Obama next week, it will be because the divided Republicans of 2008 can't agree on what's right about themselves.

· Michael Crowley is senior editor at New Republic magazine