Thousands of people across the UK might have been stopped and searched illegally, figures released by the Home Office suggest.
Powers under section 44 of the Terrorism Act were used in "error" after the proper authorisations were not given.
In one example, for April 2004, the Met Police wrongly stopped 840 people.
Dozens of other examples from across the UK have been uncovered before rules were tightened in 2008.
Police Minister Nick Herbert said administrative errors were to blame and he has ordered an internal review of procedures.
The Metropolitan Police is also urgently considering what steps can be taken to contact the individuals concerned.
Section 44 of the Terrorism Act 2000 allows police to stop and search someone without suspicion that an offence has occurred.
The controversial powers can be used only in specific areas on the orders of a police chief, with later approval by the home secretary.
Supporters say such powers can make it harder for extremists to carry out reconnaissance in public areas, such as near high-profile tourist attractions.
But critics, including the government's reviewer of terror legislation, Lord Carlile, say they unfairly target some ethnic groups and increase community tensions.
The Met is responsible for the vast majority of section 44 operations, many of which take place in Westminster and at major transport hubs or "iconic" tourist sites such as Buckingham Palace.
The force only discovered the April 2004 blunder after a request was made under the Freedom of Information Act earlier this year.
Officials researching stop and search authorisations found a Home Office minister had not signed within 48 hours.
A Met spokesman said the mistake was not noticed in 2004 due to an "oversight" and procedures have been reviewed.
Asked whether the force now faced a flood of legal actions, he said: "It is a matter for individuals to seek legal advice in relation to this issue."
The spokesman also denied the force had misled the public, saying: "The Met first became aware of the issue in April 2010 during the process of compiling data in answer to a Freedom of Information request.
"All public statements issued before that date were made in good faith and there was no intention to mislead the public."
The Met case sparked a trawl for errors across the UK.
Officials discovered 33 occasions when forces asked for a 29-day search window, even though the legislation only allows a maximum of 28 days. In two cases, forces asked for 30 days.
The Home Office has written to each of the 14 police forces concerned to alert them to the errors.
It said the forces were now in the process of assessing how many individuals were illegally stopped and searched and would "do their best to contact those involved".
Security Minister Baroness Neville-Jones said: "I am very concerned by these historical administrative errors. To maintain public confidence in our counter-terrorism powers, it is absolutely crucial all those responsible for exercising them do so properly.
"I take these matters extremely seriously and have instructed the department to conduct an urgent review of current procedures to ensure that errors can be prevented in future.
"The government is already committed to undertaking a review of counter-terrorism legislation which will include the use of stop and search powers in section 44 of the Terrorism Act 2000. We shall make our findings known as soon as possible."
Officials at the Home Office, National Policing Improvement Agency (NPIA) and Association of Chief Police Officers (Acpo) are examining the mistakes.
The 40 flawed operations uncovered by officials include three which have previously been identified as being based on flawed paperwork.
The forces involved are: Metropolitan Police, North Yorkshire, Hampshire, Bedfordshire, Essex, Greater Manchester, Fife, South Wales and Thames Valley.
Invalid operations linked to Sussex Police and South Wales Police have been highlighted to Parliament previously.
Acpo lead officer on stop and search, Chief Constable Craig Mackey, said: "Stop and search can work well when it is carried out with the support and understanding of the community. Used correctly, it can create a hostile environment for terrorists to operate in and help protect the public."
In January this year, the powers were ruled illegal by the European Court of Human Rights. The new coalition government has said it is reviewing their use, as part of a wider overhaul of anti-terror legislation.