A man reacts as he attends a gathering of people celebrating the death of The Iron Lady

We will use your email address only for sending you newsletters. Please see our Privacy Notice for details of your data protection rights.

Make the most of your money by signing up to our newsletter fornow

Specialist officers are already trawling through extremist intelligence files and social media such as Twitter to identify potential troublemakers.

Many anarchist groups are believed to be planning disorder to coincide with the ceremonial funeral.

If police have reasonable grounds to believe crimes are about to be committed they are justified in making arrests, say legal experts.

Suspects could be held at police stations for the duration of the event or released on bail conditions not to enter an area around the route.

Similar tactics were used successfully in the run-up to the Royal Wedding in April 2011.

Detailed plans for policing the funeral were being drawn up yesterday but it is believed up to 5,000 police officers will be on duty or held in reserve, including many from forces outside the capital.

Uniformed police and military personnel will line the two-mile route from the Palace of Westminster to St Paul’s Cathedral with scores of undercover officers mingling with crowds.

With the attendance of the Queen, David Cameron and so many VIPs from home and abroad, the event will be viewed as a possible terrorist ­target.

Armed officers will be out in force and snipers will be put on rooftops.