Analysts said the Islamic State considers anyone whose actions were inspired by the group to essentially be a member.
“This is how ISIS decentralizes its terrorism,” said Laith Alkhouri, a director at Flashpoint, a business risk intelligence company in New York that tracks militant threats and cyberthreats. “As of now, there’s no indication that ISIS orchestrated or directed these attacks.”
On Sunday morning, Mrs. May’s Conservative Party and the opposition Labour Party announced that they were suspending campaigning for the parliamentary elections — for less than a full day, in the case of Labour — out of respect for the victims. However, the right-wing, populist U.K. Independence Party said it would continue with its scheduled campaign events.
Mrs. May said the election would go ahead on Thursday as planned.
The prime minister led an emergency meeting of her security cabinet on Sunday morning. In a statement afterward, she said the government would intensify its counterterrorism efforts to deal with Islamist radicalism at home and to try to restrict “the safe spaces it needs to breed,” both on the internet and in British communities.
“Everybody needs to go about their lives as they normally would,” she said. “Our society should continue to function in accordance with our values. But when it comes to taking on extremism and terrorism, things need to change.”
Mrs. May said that the government might extend the duration of custodial sentences for terrorism suspects, but that more needed to be done in binding communities together to combat what she called “a perversion of Islam,” adding, “There is, to be frank, far too much tolerance of extremism in our country.”
Mrs. May, who was home secretary for six years before becoming prime minister, has been pressing for a tougher line against Islamist extremism for some time. By stating on Sunday that police and security measures were insufficient, she was announcing a new effort, if re-elected, to break down what she sees as self-segregated communities and to be less delicate in confronting them.
Legally, she has been stymied by the difficulty of finding a definition of extremism that would hold up in court when challenged on the grounds of free speech.
A good example of the challenge is the case of Anjem Choudary, who spent nearly two decades preaching jihad and radicalizing youths. While some of his organizations were banned, Mr. Choudary, a lawyer, managed to avoid breaking the law while being credited with helping to recruit hundreds of British Muslims to fight for Al Qaeda and the Islamic State.
Mr. Choudary was convicted in 2016 of inviting support for a terrorist organization after film emerged of him pledging allegiance to the Islamic State’s self-styled caliphate. He was sentenced to five years and six months in prison.
Mrs. May also called for a global effort to “regulate cyberspace,” something that is likely to prove difficult, and said the London attack was not connected to the suicide bombing at a pop concert in Manchester, England, last month that killed 22 people.
While none of the assailants in Saturday’s attack were identified, the counterterrorism police conducted a raid Sunday in Barking, in east London, and arrested 12 people — seven women and five men — ages 19 to 60. The police said searches there continued, suggesting that they had identified at least one assailant.
Britain’s home secretary, Amber Rudd, said on Sunday that the government was confident the attackers were “radical Islamist terrorists.” Speaking on ITV television, Ms. Rudd said, “As the prime minister said, we are confident about the fact that they were radical Islamist terrorists, the way they were inspired, and we need to find out more about where this radicalization came from.”
She refused to say whether the attackers had been known to the authorities before Saturday.
Ken Chigbo, a resident of the neighborhood on King’s Road in Barking where the apartment was raided, said he knew the man who lived in the apartment. He said the neighbor lived with his wife and two young children, looked to be in his mid-20s and was known in the community by his nickname, “Abs.”
“He would always be in a religious gown to his shins, with tracksuit bottoms and trainers underneath,” Mr. Chigbo, 26, said about his neighbor, with whom he played table tennis. “I trusted him. We got on.”
Mr. Chigbo added that a group of three to four men would visit his neighbor’s apartment every week or so. “They were always in religious robes and wearing red-and-white checkered scarves wrapped around their heads,” he said.
The man named Abs had expressed interest in a van that Mr. Chigbo rented recently for a move. “He said, ‘Look, Ken, where did you get your van from, how much did you pay, do they do it in automatic?’” Mr. Chigbo recalled. “Then he said he and his family are thinking of moving too.”
With the general election days away, several polls have shown Mrs. May’s lead over Jeremy Corbyn, the Labour leader, to be narrowing.
Mr. Corbyn issued his own strong condemnation of the attacks. “We are all shocked and horrified by the brutal attacks in London,” he said in a statement. “My thoughts are with the families and friends of those who have died and the many who have been injured. Today, we will all grieve for their loss.”
Using different methods, pollsters are divided about the extent of the Conservative lead, but they all show the gap with Labour shrinking, making the landslide Mrs. May hoped for unlikely and even, for at least one polling company, raising the possibility of a hung Parliament.
It is too early to say how the attack will affect the vote, if at all. In general, crises tend to help the incumbent. However, Mrs. May did not seem to receive much of a polling bounce after the Manchester attack, partly because of some campaign mistakes. And as the former home secretary, she might receive some blame for perceived security failings.
Campaigning had already been suspended once, after the Manchester attack. That happened while Mrs. May was on the defensive, having had to change the position on home care policy announced just days earlier in her party’s manifesto.
Mayor Sadiq Khan of London said that the police had been dispersed across the city and that security would remain heightened throughout the week.
Mr. Khan, who described the assault as a “deliberate and cowardly attack on innocent Londoners,” said that some of the injured were in critical condition, raising the possibility that the death toll would rise. “We will never let these cowards win, and we will never be cowed by terrorism,” he said.
The Muslim Council of Britain also condemned the attack and praised the emergency services.
“Muslims everywhere are outraged and disgusted at these cowards who once again have destroyed the lives of our fellow Britons,” said the council’s secretary general, Harun Khan. “That this should happen in this month of Ramadan, when many Muslims were praying and fasting, only goes to show that these people respect neither life nor faith.”
The attack hit a nation still recovering from the shock of the bombing in Manchester almost two weeks ago, when a suicide bomber blew himself up outside the doors of an Ariana Grande concert. Many of those killed were children, and 116 people were injured.
Ms. Grande returned to Manchester with a star-powered lineup on Sunday night to perform in a charity concert and pay tribute to the victims.
Saturday’s attack was reminiscent of another on Westminster Bridge on March 22, when Khalid Masood, 52, drove a car into pedestrians, killing four people. He then stabbed a police officer to death before being shot and killed near Parliament. The police treated that attack, in which 50 were injured, as “Islamist-related terrorism.”
The mood in London veered from shock to anger in the aftermath of Saturday’s attack.
Expressions of support poured in from Europe, the United States and beyond. In a news media communiqué, President Emmanuel Macron of France expressed solidarity with the British people and described the attack as “horrendous and cowardly.”
“French citizens are among the victims,” he said. “France is doing everything it can to provide them with assistance.” As none of the victims were immediately identified, it was not clear if any were French.
In a statement, Prime Minister Justin Trudeau of Canada said that a Canadian citizen was among those killed in the attack. The premier of British Columbia, Christy Clark, confirmed the death of Chrissy Archibald, who was from the province.
Prime Minister Malcolm Turnbull of Australia said citizens of his nation, too, were among the injured.
Chancellor Angela Merkel of Germany said, “We are united beyond all borders in horror and sorrow, but also in determination.”
And President Trump said on Twitter: “Whatever the United States can do to help out in London and the UK, we will be there — WE ARE WITH YOU. GOD BLESS!”
But then the president took aim at “political correctness” and Mr. Khan. “We must stop being politically correct and get down to the business of security for our people,” he posted. “If we don’t get smart it will only get worse.”
Mr. Trump then accused Mr. Khan, inaccurately, of saying there was nothing for Londoners to be concerned about. “At least 7 dead and 48 wounded in terror attack and Mayor of London says there is ‘no reason to be alarmed!’” he wrote.