Counter-terrorism officials launched a major operation over fears of multiple bomb attacks in Whitehall, central London, and on Christmas shoppers and revellers in the West Midlands, the Guardian has learned.

In a series of co-ordinated pre-dawn raids in Stoke, Birmingham, Cardiff and east London, police arrested 12 men aged 17 to 28 and began extensive searches of a number of properties.

Sources with knowledge of the operation said the arrests followed intelligence that targets including "public spaces" and shopping areas in the West Midlands were part of a suspected plot. Sites in Whitehall, including around the Houses of Parliament, were also said to be possible targets. Sources said it is believed that the targets had been scouted as part of the alleged plot.

If the intelligence and assessment by British counter-terrorism officials are correct, it means an attack may have been averted with days to spare. The multiple arrests followed a long undercover investigation led by MI5, according to counter-terrorism officials.

One source said that intelligence had led the security services to launch a surveillance operation against the men, which intensified within the past weeks.

In the past few days the decision was taken, at an executive liaison group where police and MI5 meet to discuss major operations, that the suspected plot had to be disrupted because it was believed there was too great a chance of an attack being staged.

Those arrested are all British, and some come from a Bangladeshi background. They are alleged to be involved in a serious plot, officials made clear, indicating this was more than an operation designed to disrupt or warn off suspects. Only the sparsest details were made public . Scotland Yard's head of counter-terrorism, John Yates, said: "They were all arrested under the Terrorism Act 2000 on suspicion of the commission, cooperation and instigation of acts of terrorism.

"They are currently in custody at three separate police stations across the country where they will be interviewed over the coming days. We are also searching a large number of premises and I expect that these searches will take some time to complete.

"With the current threat level in the UK at severe and with the information we have, I believe today's arrests were absolutely necessary in order to keep the public safe."

There were still gaps in the knowledge of counter-terrorism police and the security services about the full extent of the suspected plot. Those running the operation, which involved the West Midlands counter-terrorism unit and which was led by Scotland Yard's counter-terrorism command, said they were sufficiently concerned that before full examinations of addresses were carried out they ordered "safety searches" be conducted to ensure there were no hazardous materials or booby traps.

Some past high-profile terrorism arrests have been based on intelligence which has turned out to be untrue, and have led to accusations that police and MI5 have ramped up the nature of plots.

An armed raid in 2006 in Forest Gate, east London, saw one person accidentally shot as investigators hunted down a suspected chemical device. The intelligence turned out to be wrong.

In 2009 police staged daylight armed raids in Manchester and Liverpool against people suspected of plotting attacks on shopping centres in northern England. Those arrested were released within days and without charge, in what seemed to be an embarrassment for UK authorities.

Well-placed officials described today's investigation as "significant" but emphasised it was not linked to the recent attempted suicide bombing in Stockholm, the Yemen ink cartridge bomb plot, or any other recent attacks or warnings of concerted pre-Christmas terror campaigns in European countries.

Sources pointed to the balance MI5 and the police have to make between the potential danger to the public and a need to get sufficient intelligence and evidence to stand up in court.

Also taken into account were the resources taken up in an investigation involving tracking the movements of multiple persons.

The potential for a mass casualty attack meant the home secretary, Theresa May, was briefed on developments. May warned of a complex and lengthy investigation. "I have been kept fully informed about the police operation that has resulted in 12 arrests. We know we face a real and serious threat from terrorism and I would like to thank the police and security service for working to keep our country safe," she said.

It is understood that the Crown Prosecution Service has been advising police throughout the covert operation about the direction the investigation needed to take to secure evidence to bring any criminal charges.

The UK threat level for al-Qaida inspired terrorism remains at "severe", and for Irish republican terrorism it is one level lower at "substantial".

In the Riverside area of Cardiff three men were arrested and police attention focused on a seven-bedroom Victorian house in Neville Street.

It is understood that the house is occupied by a middle-aged couple who run a takeaway restaurant, and their two sons, one in his late 20s, one a little older. However it is not known if any of that family was arrested.

Officers were carrying out a search of the property and seized a Mercedes estate car. Local people spoke of the presence of extremist elements in the area.