NEW YORK — A 27-year-old man detonated a crude pipe bomb strapped to his body inside a crowded Manhattan subway passage Monday morning, according to police — sending terrified commuters running for the exits and counterterrorism officials racing to unravel the second terrorist attack in the city in less than two months. 
 
 Authorities identified the suspect as Akayed Ullah, an immigrant from Bangladesh who came to the United States in 2011. The attack — which left the suspect wounded but otherwise caused only minor injuries to three commuters — immediately rekindled public debates about terrorism, public safety and immigration. 
 
 The pipe bomb, affixed to Ullah’s clothes with Velcro and zip ties, detonated about 7:20 a.m. as he walked in an underground passageway from the subway station at 42nd Street and Eighth Avenue to a nearby station at Seventh Avenue, police said. The attack brought Monday’s morning commute in crowded Times Square to a standstill as a massive police response locked down the area while authorities searched for other bombs. 
 
 Ullah told investigators that he was inspired by propaganda from the Islamic State terror group, according to law enforcement officials. The FBI and the New York Police Department were investigating, and charges in federal court were expected to be filed against Ullah soon. 
 
 Security video shows a man walking down the crowded tunnel, seemingly just another ­passerby until a giant puff of smoke knocks him to the ground. For a moment he is still and then starts to move his leg, clearly in pain. 
 
 Ullah sustained burns and cuts to his hands and abdomen, authorities said. The three people who suffered minor injuries complained of ringing in their ears and headaches, and they took themselves to hospitals. 
 
 Police rushed to secure the scene and evacuate pedestrians. Ullah began talking to authorities as he lay on the ground, according to law enforcement officials. He has told investigators that he acted alone, and in those first moments after the explosion, police focused on ruling out the possibility that he might have planted other bombs in the city’s subway system, officials said. 
 
 Investigators were able to determine he meant to detonate the bomb at that spot in the tunnel, in part because that is where he surreptitiously connected a small battery to a set of Christmas lights in the pipe bomb, officials said 
 
 Sam and Patricia Sladnick, who had been in town visiting relatives, were entering the Port Authority bus terminal when they heard an explosion and saw people start to run. 
 
 “I heard something, but didn’t know what it was,’’ said Sam. At first, Patricia froze, and Sam had to pull her out of the way. “I guess I should have stopped to help other people, make sure they got out okay, but I didn’t know whether there was going to be another explosion or what so we left.’’ 
 
 Ullah was taken to Bellevue Hospital in Manhattan, where he again spoke to investigators, law enforcement officials said. 
 
 Officials said he came to the United States on a type of visa for relatives of people already living legally in the country. President Trump said the incident was another example of why the United States needs to curb immigration. 
 
 “Today’s attempted mass murder attack in New York City — the second terrorist attack in New York in the last two months — once again highlights the urgent need for Congress to enact legislative reforms to protect the American people,” the president said in a statement, also referring to a deadly truck attack in Manhattan on Oct. 31. “America must fix its lax immigration system, which allows far too many dangerous, inadequately vetted people to access our country. Today’s terror suspect entered our country through extended-family chain migration, which is incompatible with national security.” 
 
 He also said that people convicted of terrorism charges “deserve the strongest penalty allowed by law, including the death penalty in appropriate cases.” 
 
 Attorney General Jeff Sessions also weighed in, saying “the 20-year-old son of the sister of a U.S. citizen should not get priority to come to this country ahead of someone who is high-skilled, well-educated, has learned English, and is likely to assimilate and flourish here.’’ 
 
 New York officials focused their remarks on how quick thinking by police and poor craftsmanship by the suspect saved lives. 
 
 Mayor Bill de Blasio called an attack on the subway system “incredibly upsetting. And let’s also be clear, this was an attempted terrorist attack. Thank God the perpetrator did not achieve his ultimate goals.” 
 
 New York Gov. Andrew M. Cuomo (D) called the attacker’s weapon an “effectively low-tech device,” saying: “Anyone can go on the Internet and download garbage and vileness and how to put together an amateur-level explosive device, and that is the reality that we live with. The counter-reality is that this is New York and we all pitch together and we are a savvy people.” 
 
 The explosion Monday came just weeks after a man driving a truck plowed through pedestrians and bicyclists on a path along Manhattan’s West Side, killing eight people and wounding a dozen others. Prosecutors have charged that driver with murder, saying he confessed to carrying out the attack in the name of the Islamic State . 
 
 “This is a fact of life, whether you’re in New York or London or Paris,” said John Miller, who leads counterterrorism work at the NYPD. “The question is can it happen here, and the answer is it can happen anywhere.” 
 
 Miller said investigators have collected remnants of the bomb to better understand its construction. The NYPD and the FBI appealed for any witnesses to the explosion to come forward, and said commuters should expect to see additional security around the city’s transportation network. 
 
 While there were no immediate assertions of responsibility for the explosion, a pro-Islamic State media group, Maqdisi Media, suggested that it was carried out in response to President Trump’s recent statement recognizing Jerusalem as the capital of Israel, according to the SITE Intelligence Group, which monitors extremist activity. 
 
 Ullah also told investigators he was angry about U.S. policy toward Muslim countries stretching back more than a decade, including the Obama and George W. Bush administrations, according to law enforcement officials. 
 
 At the Brooklyn home where officials say Ullah lived with relatives, neighbors said the young man had worked as a cabdriver and seemed quiet. 
 
 Police also searched a nearby apartment where one of Ullah’s relatives was believed to live. 
 
 Across the street was Iskandar Voseev, 16, who said he has lived in a neighboring building in Kensington with his family for eight years. 
 
 “This place is a really peaceful place, you know?” the teen said, watching the commotion. “It’s really messed up what happened. I’m scared.” 
 
 Voseev said the residents of his block are mostly immigrants from Uzbekistan and Yemen. He is worried people will blame all Muslims for the actions of someone with roots in his community. 
 
 “In one tree, if an apple is bad, it doesn’t mean all the apples are bad,” the teen added. 
 
 Mark Berman, John Wagner, Renae Merle and Julie Tate contributed to this report. ||||| Police officers patrol in the passageway connecting New York City's Port Authority bus terminal and the Times Square subway station Tuesday, Dec. 12, 2017, near the site of Monday's explosion. Commuters... (Associated Press) 
 
 Police officers patrol in the passageway connecting New York City's Port Authority bus terminal and the Times Square subway station Tuesday, Dec. 12, 2017, near the site of Monday's explosion. Commuters returning to New York City's subway system on Tuesday were met with heightened security a day after... (Associated Press) 
 
 NEW YORK (AP) — A Bangladeshi immigrant arrested in a New York subway bombing mocked President Donald Trump on social media while on his way to carry out the botched suicide mission, authorities said as they brought federal charges against him Tuesday. 
 
 Akayed Ullah posted a statement on his Facebook account just before the Monday morning attack, stating: "Trump you failed to protect your nation," the criminal complaint said. He also told law enforcement officers at the hospital where he was taken with burn injuries to the body and hands: "I did it for the Islamic State," according to the complaint. 
 
 His rush-hour attack fizzled in a long walkway used by commuters moving between trains in the city's busiest subway station at Times Square. Three pedestrians complained of harmed hearing and headaches after the bomb went off. 
 
 Ullah, 27, was expected to appear before a magistrate judge, though it was not immediately clear if he was well enough to go to court. 
 
 During a search of his Brooklyn apartment, investigators recovered a passport with the words "O America, die in rage" scrawled in it, the complaint says. 
 
 He hoped to "terrorize as many people as possible" with a bomb filled with metal screws that he believed would cause maximum damage, the complaint said. 
 
 The complaint charged Ullah with providing material support to a terrorist group, use of a weapon of mass destruction and three bomb-related counts. 
 
 It was not immediately clear who would represent Ullah in court. 
 
 A news conference was planned for later Tuesday. 
 
 According to the complaint, Ullah started to become radicalized in 2014 and began researching how to build bomb after he had "viewed pro-ISIS materials online, including a video instructing, in substance, that if supporters of ISIS were unable to travel overseas to join ISIS, they should carry out attacks in their homelands." 
 
 Overseas, Bangladesh counterterrorism officers were questioning Ullah's wife and other relatives, officials there said Tuesday. Relatives and police said Ullah last visited Bangladesh in September to see his wife and newborn son before leaving them behind to return the United States. 
 
 Hours after Monday's explosion, Trump cited the background of the bomber in renewing his call for closer scrutiny of foreigners who come to the country and less immigration based on family ties. 
 
 Ullah — who told investigators he wanted to retaliate for American action against Islamic State extremists — came to the U.S. from Bangladesh in 2011 on a visa available to certain relatives of U.S. citizens. 
 
 "Today's terror suspect entered our country through extended-family chain migration, which is incompatible with national security," Trump said in a statement that called for various changes to the immigration system. Earlier, White House spokeswoman Sarah Huckabee Sanders said Trump's proposed policies "could have prevented this." 
 
 On his last visit to Bangladesh, the suspect mostly remained inside a small apartment in Dhaka's Hazribagh area, said his uncle, Abdul Ahad. His nephew arrived in Bangladesh on Sept. 8 and returned to New York on Oct. 22, he said. 
 
 "He went out of his residence to offer prayers at a nearby mosque," Ahad told The Associated Press. 
 
 In a scenario New York had dreaded for years, Ullah strapped on a crude pipe bomb with Velcro and plastic ties, slipped unnoticed into the nation's busiest subway system and set off the device, authorities said. 
 
 The bomb didn't work as intended; authorities said Ullah was the only person seriously wounded. But the attack sent frightened commuters fleeing through a smoky passageway. 
 
 Ullah's low-tech bomb used explosive powder, a nine-volt battery, a Christmas light and matches, officials said. Investigators said the suspect was seen on surveillance footage igniting the bomb. In the end, it wasn't powerful enough to turn the pipe into deadly shrapnel, the officials said. 
 
 Law enforcement officials said Ullah looked at IS propaganda online but is not known to have any direct contact with the militants and probably acted alone. 
 
 The attack came less than two months after eight people died near the World Trade Center in a truck attack that, authorities said, was carried out by an Uzbek immigrant who admired the Islamic State group. 
 
 Ullah lived with his father, mother and brother in a Brooklyn neighborhood with a large Bangladeshi community, residents said. He was licensed to drive a livery cab between 2012 and 2015, but the license was allowed to lapse, according to law enforcement officials and New York City's Taxi and Limousine Commission. 
 
 John Miller, NYPD's Deputy Commissioner for Counterterrorism, said Tuesday on CBS "This Morning" that Ullah didn't seem to have any obvious problems. 
 
 He "was living here, went through number of jobs, was not particularly struggling financially or had any known pressures," Miller said, adding Ullah "was not on our radar at NYPD, not on the FBI radar." 
 
 Security cameras captured the attacker walking casually through a crowded passageway when the bomb went off around 7:20 a.m. A plume of white smoke cleared to show the man sprawled on the ground and commuters scattering. 
 
 Port Authority police said officers found the man injured on the ground, with wires protruding from his jacket and the device strapped to his torso. They said he was reaching for a cellphone and they grabbed his hands. 
 
 ___ 
 
 Associated Press writers Tom Hays, Jake Pearson, Kiley Armstrong, Larry Neumeister and David James Jeans in New York, Michael Balsamo in Los Angeles, Matt Pennington in Washington, D.C., and AP researcher Rhonda Shafner in New York contributed to this report. ||||| New York Gov. Andrew Cuomo, left, talks to Mayor Bill de Blasio at a news conference, Monday, Dec. 11, 2017, outside the Port Authority Bus Terminal in New York. Police said a man with a pipe bomb strapped... (Associated Press) 
 
 New York Gov. Andrew Cuomo, left, talks to Mayor Bill de Blasio at a news conference, Monday, Dec. 11, 2017, outside the Port Authority Bus Terminal in New York. Police said a man with a pipe bomb strapped to his body set off the crude device in a passageway under 42nd Street between Seventh and Eighth... (Associated Press) 
 
 NEW YORK (AP) — A man inspired by the Islamic State group set off a crude pipe bomb strapped to his body Monday in a crowded subway corridor near Times Square, injuring the man, slightly wounding three others and sending New York commuters fleeing in terror through the smoky passageway. 
 
 Surveillance cameras captured the man walking casually through the crowded passage when the bomb went off at 7:20 a.m. amid a plume of white smoke, which cleared to show the man sprawled on the ground and commuters scattering to get away. Investigators said it was not clear if he set the bomb off intentionally or prematurely. 
 
 "This was an attempted terrorist attack," Mayor Bill de Blasio told reporters. "Thank God the perpetrator did not achieve his ultimate goals." 
 
 The suspect, who was identified as 27-year-old Akayed Ullah, was being treated at a hospital for burns to his hands and abdomen. The others who were injured suffered ringing in the ears and headaches. 
 
 Law enforcement officials said Ullah was inspired by the Islamic State group but apparently did not have any direct contact with the group and probably acted alone. Gov. Andrew Cuomo later told the NY1 cable channel that the suspect went online to learn how to make a bomb. 
 
 "We have no evidence at this time that there were any secondary devices or it was part of a larger plan," Cuomo said. 
 
 Ullah, who lives in Brooklyn, came to the U.S. from Bangladesh about seven years ago and had been licensed to drive a livery cab between 2012 and 2015, according to law enforcement officials and NYC Taxi and Limousine Commission. He was speaking with investigators from his hospital bed, police said. 
 
 A person briefed on the investigation said Ullah arrived in the United States on an F-4 visa, a preferential visa available for those with family in the U.S. who are citizens, and that he made the bomb in his home. 
 
 The officials spoke to The Associated Press on condition of anonymity because they were not authorized to speak publicly about the blast. 
 
 Investigators were searching Ullah's apartment, interviewing witnesses and relatives and looking for surveillance footage that may show his movements in the moments before the attack. 
 
 Ullah lived with his father, mother and brother in a residential area of Brooklyn with a large Bangladeshi community, neighbors said. The home was just off a shopping strip — a red two-story brick building. 
 
 Alan Butrico owns the house next door and a locksmith business two doors down. 
 
 "It's very weird," he said. "You never know who your neighbors are." 
 
 The Bangladesh Embassy in Washington condemned the attack. The deputy chief of mission, Mahbub Hassan Saleh, said the embassy had not received any information from authorities about the suspect's identity. 
 
 The explosion, which happened in an underground passageway under 42nd Street between Seventh and Eighth avenues, triggered a massive emergency response by police and firefighters both above and below ground, tangling subway and bus service at the nearby Port Authority bus terminal. 
 
 It's the city's busiest subway station and a major transit hub, with 64 million subway riders passing through every year. In 2016, daily ridership on the subway was 5.7 million, a record high. 
 
 Everything around Times Square was shut down, halting what would ordinarily be a bustling rush hour at the "Crossroads of the World." But streets quickly began returning to normal, and traffic around the area was expected to be operational by the evening rush. 
 
 Authorities said the bomb was a low-tech explosive device attached to the man with Velcro and plastic ties. They were investigating how it was made. 
 
 Port Authority police said officers found the man injured on the ground, with wires protruding from his jacket to his pants and the device strapped to his torso under his coat. They said he was reaching for a cellphone and they grabbed his hands. 
 
 A photo published by the New York Post showed a bearded man crumpled on the ground with his shirt apparently blown off and black soot covering his bare midriff. A police officer was holding the man's hands behind his back. Another photo shown on NY1 showed the bearded suspect, wide-eyed, on a stretcher being loaded into an ambulance. 
 
 Elrana Peralta, a customer-service worker for Greyhound, said she works in the Port Authority terminal near where the blast happened but did not hear the explosion. 
 
 "All we could hear was the chaos," she said. "We could hear people yelling, 'Get out! Get out! Get out!'" 
 
 John Miles, who is from Vermont, was waiting for a bus to Massachusetts. He did not hear the blast either, but saw police react. 
 
 "I didn't know what was going on. Officers were running around. I was freaking out," he said. There was an announcement that people should take their bags and leave. "They didn't incite panic. It was fairly orderly." 
 
 White House press secretary Sarah Huckabee Sanders tweeted that President Donald Trump had been briefed on the explosion. Instead of commenting on the suspected terror attack, Trump sent a tweet at 9:17 a.m. criticizing a Sunday story in The New York Times that said he watched cable news television for at least four hours a day. 
 
 The blast came just weeks after eight people died in New York when another man, also said to be inspired by the Islamic State, drove a rented truck onto a bike path near the World Trade Center. 
 
 Cuomo said at a news conference following the attack that New Yorkers should be alert but go about their lives. 
 
 "Let's go back to work," he said. ""We're not going to allow them to disrupt us." 
 
 ___ 
 
 Associated Press writers Jake Pearson, Kiley Armstrong and Larry Neumeister in New York, Michael Balsamo in Los Angeles, Matt Pennington in Washington, D.C., and researcher Rhonda Shafner in New York contributed to this report. 
 
 ___ 
 
 Follow Colleen Long on Twitter at: www.twitter.com/ctlong1 .
– The man accused of detonating a bomb in a subway corridor near Times Square Monday morning carried the device strapped to himself on a 55-minute subway ride from his Brooklyn home, law enforcement officials say. Akayed Ullah, who came to the US from Bangladesh in 2011, injured himself and three others in the blast. Law enforcement officials tell the New York Daily News that the 27-year-old, who says he was inspired by ISIS, decided to set off the bomb in a commuter-packed passageway connecting three stations after seeing a Christmas poster. The pipe bomb was packed with explosive powder and detonated with a broken Christmas light, authorities say, but the explosion was not powerful enough to turn the pipe into deadly shrapnel. After the blast, Ullah was subdued by four Port Authority police officers. Ullah, who's expected to face numerous federal charges, was hospitalized with serious burns, while another three people received minor injuries. Law enforcement officials tell the New York Times that Ullah, who apparently worked for a car service after arriving in the US and more recently worked as an electrician, has told them he was radicalized online and found bomb-making instructions on the internet. Ullah came to the US on a preferential visa for people with relatives already in the US, and President Trump says the attempted terrorist attack is another reason to tighten immigration rules, the Washington Post reports. "Today's terror suspect entered our country through extended-family chain migration, which is incompatible with national security," he said Monday.