WASHINGTON — Why was Faisal Shahzad permitted to board a flight for Dubai some 24 hours after investigators of the Times Square terrorism case learned he might be connected to the attempted bombing?

Though Mr. Shahzad was stopped before he could fly away, there were at least two significant lapses in the security response of the government and the airline that allowed him to come close to making his escape, officials of the Department of Homeland Security, the Federal Bureau of Investigation and other agencies said on Tuesday.

First, an F.B.I. surveillance team that had found Mr. Shahzad in Connecticut lost track of him — it is not clear for how long — before he drove to John F. Kennedy International Airport in New York, the officials said. As a result, investigators did not know he was planning to fly abroad until a final passenger list was sent to officials at the federal Customs and Border Protection agency minutes before takeoff.

In addition, the airline he was flying, Emirates, failed to act on an electronic message at midday on Monday notifying all carriers to check the no-fly list for an important added name, the officials said. That meant lost opportunities to flag him when he made a reservation and paid for his ticket in cash several hours before departure.

Top Obama administration officials and some members of Congress on Tuesday praised the government’s handling of the investigation, noting that Mr. Shahzad was identified, tracked and arrested before he could escape.