LONDON — Everyone called him “Abs.” He gave out Halloween candy to children and taught them how to play Ping-Pong. He invited his neighbors to a barbecue.

But Khurum Shazad Butt was not the typical resident of the East London neighborhood of Barking. He dressed in the religious gown of a conservative Muslim — with a tracksuit and sneakers underneath. He turned up in a Channel 4 documentary, “The Jihadis Next Door.” And now London’s Metropolitan Police have identified him as one of the three men who carried out the deadly terror attack on Saturday at London Bridge and Borough Market.

Mr. Butt and his accomplices drove a van onto the sidewalk of London Bridge, running over pedestrians, before jumping out of the vehicle and stabbing patrons at the bars and restaurants of Borough Market. They killed seven people and injured dozens before they were shot and killed by the police less than 10 minutes after the rampage began.

With questions mounting about whether authorities had let the killers slip through their fingers, the police confirmed that Mr. Butt “was known” to them and to MI5, the British intelligence service.

“However, there was no intelligence to suggest that this attack was being planned and the investigation had been prioritized accordingly,” the police said in a statement. “The other named man, Rachid Redouane, was not known.”

Even so, Prime Minister Theresa May found herself on the defensive on Monday, as rivals challenged her record on security after the third terrorist episode in three months.

Mrs. May, who is leading her Conservative Party into a national election on Thursday, held the portfolio in charge of security for six years before replacing David Cameron as prime minister in July, and she oversaw a reduction in police forces, including armed officers, during that time.

The Metropolitan Police released photographs on Monday of Mr. Butt, 27, and Mr. Redouane, 30.

Mr. Redouane had claimed to be Moroccan and Libyan, the police said, and also sometimes used a pseudonym, Rachid Elkhdar. The authorities are still trying to confirm the identity of the third attacker.

Mr. Butt appeared briefly in a Channel 4 television documentary last year about extremists living in Britain. The film, which is available on Netflix, featured a number of British Muslim men openly expressing their support for violence. In one scene, Mr. Butt stands in line with five other men in Regent’s Park in London as another man kneels in front of them unfurling an Islamic State flag.

In Barking, residents of the Elizabeth Fry Apartments on Kings Road said Mr. Butt had lived in the building with his wife and young children, including a newborn.

Image

Hundreds attended a vigil on Monday in Potters Fields Park in London for the victims of the terror attack on June 3.CreditJack Taylor/Getty Images

“His wife just gave birth, the baby was 2 weeks old,” said Nasser Ali, who lives in the building facing Mr. Butt’s apartment.

Another neighbor said he would see Mr. Butt coming and going from the apartment complex. “I just saw him going in and out,” said the neighbor, Shehzad Khurram. “I saw him walking his kids.”

It was the van that struck a chord with Ken Chigbo, one of Mr. Butt’s neighbors in Barking.

“He approached me about a week ago, making conversation, and found out I’m moving home,” Mr. Chigbo recalled in a phone interview on Sunday, before the police had officially identified Mr. Butt as one of the attackers. “He was just being polite. Then he said, ‘Look, Ken, where did you get your van from? How much did you pay? Do they do it in automatic?’ ”

Mr. Chigbo knew Mr. Butt only as Abs, the nickname everyone seemed to call him. He had recalled how “he would always be in a religious gown to his shins, with tracksuit bottoms and trainers underneath.” But on Monday Mr. Chigbo identified Mr. Butt in a photograph released by police as the same man.

The two men met barely a week after Mr. Chigbo moved into the complex three years ago. “He invited me and everyone to a barbecue in the block’s shared garden green area a week ago,” Mr. Chigbo said. “He’s a neighbor. I trusted him, we got on.”

Sarah Sekyejwe, who lives with her husband and children in the newly built row of houses next to the Elizabeth Fry Apartments, said Mr. Butt had moved to the street in 2014 and befriended the local children. “My daughter says he’s the one who on Halloween would open the door and give them lots of sweets,” she recalled. “And in the summer he put out a table-tennis table and taught the kids how to play.”

Mr. Chigbo said small groups of three or four “Muslim guys” used to regularly visit Mr. Butt’s apartment. “I found them quite intimidating, actually,” he said. “They were always in religious robes and wearing red and white checkered scarves wrapped around their heads.”

Twelve people were arrested in the investigation into the terror attack, and homes in East London were raided. But on Monday night, the police said that all those in custody had been “released without charge.”

Although there has been widespread praise for the professionalism and courage of the armed officers who shot and killed the assailants within eight minutes of being called Saturday night, the country’s broader antiterrorism strategy was questioned.

“I am so sick of Theresa May blaming others for terror when the system she presided over has obviously failed so lamentably,” Steve Hilton, once a close adviser to Mr. Cameron, wrote on Twitter. Mrs. May, he added in a separate tweet, “should be resigning, not seeking re-election.”

Jeremy Corbyn, the leader of the opposition Labour Party, when asked by a reporter if he would support calls for Mrs. May’s resignation over the falling number of police officers, replied, “Indeed, I would.”

Image

Back on the campaign trail on Monday, Prime Minister Theresa May spoke at a security think tank in London about the terrorist threat to Britain.CreditDan Kitwood/Getty Images

Stung by the criticism just days before a national election that will decide her political future, Mrs. May responded at a news conference. “We have protected counterterrorism policing budgets,” she said. “We have also provided funding for an increase in the number of armed police officers.”

A focus on security would normally be expected to help the prospects of Mrs. May’s Tories in the approaching election. But as the investigation builds, so does speculation of potential security lapses that could have been prevented, possibly along with Saturday night’s attack.

Late on Sunday, Mr. Corbyn criticized the decrease in the number of police officers since 2010. “You cannot protect the public on the cheap,” he said.

The total number of officers in England and Wales fell more than 19,500 from September 2010 to September 2016, according to the Home Office. Authorized firearms officers declined to 5,639 in March 2016 from 6,976 in March 2010.

The government says, however, that the number of armed officers is to increase by more than 1,000 in the next two years, that additional specialist teams are being set up outside London and that there will be 41 additional armed response vehicles.

Mr. Corbyn also accused the government of failing to publish a report, undertaken in early 2016, on foreign financing of extremist groups, for fear of upsetting foreign governments, although he himself is vulnerable on security issues.

He has demonstrated past support for Irish republicans and expressed doubts two years ago about a so-called shoot-to-kill policy for police officers during serious terrorist attacks.

Also on Monday, Mrs. May came to the defense of Mayor Sadiq Khan of London, who has been accused of being soft on terrorism by President Trump. Mrs. May said that she was working closely with the mayor and that he was doing “a good job,” adding, in answer to persistent questioning by reporters, that it was “wrong to say anything else.”

Mr. Khan, the first Muslim mayor of the British capital, had said after Saturday’s attack that Londoners should not be “alarmed” if they saw more police officers on the street. On Twitter on Sunday, Mr. Trump mischaracterized the quote to make it seem as if the mayor was telling his people not to be alarmed by terrorism; Mr. Khan’s office said that the “ill-informed tweet” deliberately took his remarks out of context.

The president fired back on Monday. “Pathetic excuse by London Mayor Sadiq Khan who had to think fast on his ‘no reason to be alarmed’ statement,” he wrote.

On Monday night, Mr. Khan led a brief vigil for the victims at Potters Fields Park, near the River Thames.

“I want to send a clear message to the sick and evil extremists who commit these hideous crimes. We will defeat you,” he said, adding, “as a proud and patriotic Muslim I say this: You do not commit these acts in my name.”

A version of this article appears in print on , on Page A8 of the New York edition with the headline: ‘I Trusted Him’: Attacker Was Friendly With Neighbors, and Known to Police. Order Reprints | Today’s Paper | Subscribe