Margaret Thatcher's funeral on Wednesday will be surrounded by tight security as police fear protesters opposed to her political legacy and anarchists could try to disrupt the ceremonial occasion.

The British former prime minister has been as divisive in death as she was in life and police are taking no chances that the funeral procession through central London to St Paul's Cathedral will be targeted by the same protesters who staged celebrations of her death.

A major security operation has been planned, amid fears it could be disrupted by far-left groups, Irish republicans or individuals obsessed with the Iron Lady.

The high-profile guest list, headed by Queen Elizabeth II and set to include a host of international political figures and celebrities, has also increased the pressure on Scotland Yard.

Hundreds of people joined a "party" in London's Trafalgar Square on Saturday, and several said they would return to demonstrate when her flag-draped coffin is carried through the streets of the capital with full military honours.

"I plan to go there and turn my back when she comes," Sigrid Holmwood, a 34-year-old artist, told AFP, saying she objected to the estimated £10 million (11.7 million euros, $15.3 million) cost of the send-off.

Police are scanning social networking sites for information about possible protests, after the events last week were advertised on Twitter and Facebook.

They have also urged people planning to disrupt the funeral to contact them so that lawful protests can be organised, a pro-active tactic used successfully during last year's Olympic Games in London.

"The right to protest is one that must be upheld. However, we will work to do that while balancing the rights of those who wish to pay their respects," said Commander Christine Jones, who is leading the security operation.

Jones was also in charge of security at the wedding of Prince William and Kate Middleton in April 2011, which passed off peacefully.

"We are hugely experienced in safely delivering high-profile and ceremonial events in the capital," Jones said.

Police officers will be deployed at strategic points along the route that the funeral cortege will take from parliament to the cathedral and a mobile team will be on hand to deploy to trouble spots.

Fears of violent protests were sparked by impromptu parties by left-wing activists celebrating Thatcher's death on May 8, which flared up in London, Bristol, Liverpool and Glasgow.

Scotland Yard is also bracing for potential threats from individuals fixated with Britain's first female prime minister, who was in office for 11 years from 1979 to 1990.

Dai Davies, a former head of royal protection at the London police force, told The Times newspaper that police chiefs were most likely to be concerned "about a fixated person with a psychological hatred of Margaret Thatcher".

Another potential threat could come from Irish republican dissidents who have never forgiven Thatcher for her hardline approach to hunger strikers during the sectarian violence in Northern Ireland.

The Irish Republican Army (IRA), the main paramilitary group fighting British rule in the province, tried to kill her by bombing the hotel where she and her cabinet were staying for the 1984 Conservative Party conference.

The IRA gave up its armed struggle a decade ago, but dissident groups are still active in Northern Ireland.

"Baroness Thatcher's funeral is bound to excite dissident republican ambitions. It is something I know the security services are taking very seriously," Conservative lawmaker and security expert Patrick Mercer told The Guardian newspaper.

A large section of central London will be closed off for the funeral, including roads around Buckingham Palace and Parliament Square, home to parliament and Westminster Abbey.

Several London Underground stations will also be closed along the route as part of the lock-down.

A full military rehearsal of the procession took place in the early hours of Monday.

Some police leave has been cancelled. In the worst case scenario, the police will be able to call on the armed forces, 700 of whom are taking part in the funeral procession.

Army Major Andrew Chatburn, the man in charge of choreographing the parade, said protests were a matter for the police.

But he added: "Many of these (military personnel) have served in Afghanistan and if there is anything that they have to adapt to, they will adapt to it within the confines of their responsibility."