The Republican party has launched a major attack to portray the Democrats as against the Iraq war and caught in the grip of an extremist fringe that wants to pull out of the conflict.

In television ads, newspaper columns and television interviews Republican politicians and conservative commentators have branded Democrats as weak in the 'war on terror'.

The move is paving the way for the vital November mid-term elections to be fought on national security with a bitter campaign echoing the 1968 presidential election fought against the background of the Vietnam war.

The shift in gear comes in the wake of last week's stunning defeat of Democrat Joe Lieberman in a primary election for Lieberman's Connecticut seat in the Senate. A former vice-presidential candidate, Lieberman was a high-profile supporter of the invasion of Iraq. But he was defeated by an anti-war candidate, Ned Lamont, sending shock waves through the Democratic party and prompting celebrations among anti-war Democrats.

Many in the party believe there is a powerful vote-winning argument in turning against the conflict. It has seen a number of politicians, including Hillary Clinton, shift from supporting the war to being much more critical. If the Democrats do well in November with an anti-war stance, it will probably define the party's position on Iraq in the 2008 race for the White House.

But senior Republican strategists, including political guru Karl Rove, have long favoured fighting the November mid-term elections on the issues of terrorism and the war. Polls consistently show that voters favour the Republicans on national security, even as the Iraq conflict appears to be collapsing into a civil war. It will also allow Republicans to deflect Democratic criticisms over the economy, growing poverty and scandals ranging from lobbyist corruption to the lax response to Hurricane Katrina.

Republicans believe that focusing on terrorism and the war will allow them to keep control of Congress, despite a huge Democratic push and record disapproval levels of President George Bush. Vice-president Dick Cheney arranged a rare conference call with journalists to push the new message that Democrats were anti-war. '[Terrorists are] betting on the proposition that ultimately they can break the will of American people in terms of our ability to stay in the fight and complete the task,' he said.

'Lieberman is the first casualty of the war against the war against terror,' wrote columnist Michael Goodwin in the New York Daily News. Lieberman's main public support now is coming from Republicans such as Cheney, who have been quick to praise a man who has openly supported Bush on Iraq. This mirrors the way top Democrats quickly abandoned Lieberman after his defeat. Party leaders have now rushed to back Lamont.

But some in the anti-war wing of the party are still deeply suspicious of recent converts. In particular, Clinton's recent shifts of position on Iraq have not convinced many of her critics.

Jonathan Tasini, an anti-war Democrat running against Clinton for her New York Senate seat, criticised her shift as a 'quick makeover and cover-up act' and attacked her previous support for the war. 'The war was wrong from the outset, should never have been fought and was an unnecessary waste of human life and valuable economic resources,' he said. He contrasted that with Clinton's view, which officially is still that invading Iraq was justified but poorly carried out. 'Iraq was no threat to our country,' Tasini said.

As the Democrats' anti-war wing grows in power in the run-up to the November mid-term polls, so has the influence of the 'netroots', made up of leftwing activists and driven largely by organisation on the internet. The movement had lobbied hard to support and raise money for Lamont's bid and is generally anti-war and also supported a host of other anti-war candidates around the country.

However, far from being just a web-based phenomenon, it has also reflected a growing sentiment in America that the Iraq war has been a terrible mistake. After all, the bloggers still had to persuade ordinary citizens to abandon Lieberman. 'The rank-and-file voters were the ones who put Lamont over the top,' said Scott McLean, a political scientist at Connecticut's Quinnipiac University.

The Republican attack machine is well practised in taking apart Democratic candidates based on their perceived weakness on defence. They even managed to portray John Kerry, a decorated Vietnam veteran, as too soft on national security, despite the Democrats putting his war record at the centre of their campaign. Many Republicans hope that the Democrats are repeating their miscalculations of the late 1960s and early 1970s, when many spoke out against Vietnam and were trounced by Richard Nixon. 'Democrats went down this road in the late 1960s with Vietnam and they are still carrying the baggage from that leftward turn,' said John McIntyre, co-founder of the influential political website RealClearPolitics.