Mayor Michael R. Bloomberg spoke bluntly as he stood in Times Square at 2:30 a.m. last Sunday, his red bow tie and black tux testament to the haste with which he had left a White House dinner upon learning of a car bomb in Midtown Manhattan.

If anything showed that New York deserves more federal funding for security, this was it, the grim-faced Bloomberg said as lights blazed in the background from bomb experts, firefighters and police scouring the scene.

“Homeland Security funds should come to where there is a threat,” the mayor said after what police said was the 11th attempted terrorist strike on New York City since Sept. 11, 2001.

Since then, New York has spent billions of dollars on security upgrades, some visible and others undetectable to locals and the visitors who swarm its subway stations and sidewalks and wander goggle-eyed among its tourist sites.

There are bomb-sniffing dogs and police checking subway riders’ bags. There are signs urging people to report “suspicious” activities. There are checkpoints on bridges. There is a counter-terrorism bureau and intelligence division established by Police Commissioner Raymond Kelly, a former Marine colonel and onetime U.S. Customs Service chief. In the wake of the 2001 terrorist attacks, Kelly made it his mission to have New York police — not Washington-based agencies — take the lead in defending the city.

Operating from precincts in New York as well as Paris; Tel Aviv; Amman, Jordan, and other foreign posts; the 1,000 agents speak 50 languages, including Urdu, Pashto, Arabic and Persian. Surveillance equipment can scrutinize anything, whether license plates or tattoos.

It is not just Sept. 11 that has inspired changes. After the 2008 terrorist attacks in Mumbai, India, carried out by assailants firing assault rifles, some New York officers were trained in the use of similar weapons.

After the 2005 bomb attacks on the London public transport system, New York began erecting a “ring of steel” in Lower Manhattan, outfitting a 1.5-square-mile area with 3,000 surveillance cameras and radiation detectors. City and state officials are pushing Washington to provide an additional $24 million to expand the protective barrier to Midtown, which would include Times Square as well as Grand Central Terminal and Penn Station.

But city leaders face the problem of how to further circle the wagons without turning New York into a U.S. version of the Green Zone, the fortified enclave in Baghdad. “There is a balance between being so safe you can’t go out of your house, and enjoying freedom — freedom to come and go, and to talk and to be in charge of your own destiny,” Bloomberg said.

As the police chief and state leaders join the chorus for more security funds, they also face alienating other states who say they need federal money in these cash-strapped, security-conscious times.

After Sept. 11, many New York lawmakers “were always banging our fists about the fact that the city needed more than any place else in America,” said Michael Balboni, a former state lawmaker who has served as the governor’s domestic security advisor. “But politics being what it is, if you want to get a vote on an appropriations bill, you have to get support from say, a Kansas congressman. And why is he going to support New York City if he doesn’t get some piece of the funding for his state?”

New York City is by far the biggest recipient of Department of Homeland Security funds. Last year, it received more than $145 million of the $798 million allocated from the department fund to secure high-risk cities. That was more than twice the $68 million given the Los Angeles/Long Beach area. And although nobody has seriously argued that New York should not get the bulk of funds, altering the equation to give New York more would take money away from other cities and states.

“The needs are everywhere,” said Julia Fenwick, who oversees the requests for Homeland Security grants for Montana, which last year received $6.6 million. “We could always use more,” she said, citing the vast unpatrolled wilderness areas and Montana’s 500-mile border with Canada.

Underscoring the nagging quest for money are questions about the ultimate value of high-tech gadgetry aimed at preventing attempted terrorist attacks, which even New York officials acknowledge are inevitable given the city’s high profile.

Diverse, crowded and historically populated by minority groups with deep grievances, New York City has long been a terrorist target, according to Newsweek’s Christopher Dickey, author of 2008’s “Securing the City,” which described how Kelly revamped the NYPD’s anti-terrorism effort. In 1920, anarchists rammed a horse-drawn bomb into the J.P. Morgan building on Wall Street, killing 30 people and injuring 200.

“Listen, it’s just not possible to totally prevent an attack,” said former Los Angeles Police Chief William J. Bratton, who ran the New York department in the mid-1990s and returned to live here last year. “You can harden Times Square and harden Wall Street, but the next time a car with a bomb drives up to a crowd during a Yankee or Mets game, or for that matter in Boston at a Red Sox game … boom — there it all goes.” In a nod to Kelly, Bratton said the city is significantly safer from attack now.

The attempt to bomb Times Square last weekend at the height of the pre-theater dinner hour followed by eight months the discovery of a plot by Afghan immigrant Najibullah Zazi to carry out a suicide attack on the New York subway system.

Pakistani American Faisal Shahzad, who is suspected of parking his bomb-laden SUV in Times Square, was arrested Monday night after he had boarded a flight bound for Dubai, United Arab Emirates. The Nissan Pathfinder was packed with 100 pounds of fertilizer, but not the explosive kind that was used in the 1995 Oklahoma City federal building bombing.

Former New York Deputy Police Commissioner John Timoney says that that fact and other apparent blunders — such as Shahzad’s house keys being left in the SUV — shouldn’t diminish the fact that the suspect was bent on terrorism. “This guy was a professional killer, except he was incompetent,” Timoney said.

Indeed, the whys and what-ifs linger. What if Times Square street vendors hadn’t noticed the vehicle and alerted police? What if customs agents hadn’t spotted Shahzad’s name on a manifest of the Dubai-bound jet after it had been added to the no-fly list?

“The good news is we’re so much farther along than we were,” Bratton said. “The bad news is, we still have a long way to go.”

tina.susman@latimes.com

geraldine.baum@latimes.com