The hunt for a suspect in the Manhattan bombing brought to bear the full force of New York's counterterrorism operation.
And that doesn't come cheap, from the cost of special equipment to the cost of deploying tens of thousands of officers around the clock.
In all, protecting New York City's metro area from terror costs roughly $1 billion a year, according to Michael Paddock, CEO of Grants Office LLC, which tracks federal spending.
That seemed to pay off when authorities captured suspect Ahmad Khan Rahami within 48 hours. He is believed to be behind the Manhattan bombing that injured 29 people and another blast in New Jersey.
The Emergency Service Unit, the city's elite team of about 500 counter-terrorism officers, is armed to the teeth, a fraction of New York's 34,500 uniformed officers. Officers typically carry the Colt AR-15, which cost about $700 each and are also used by soldiers and Marines in Afghanistan and Iraq. Officers also have a sidearm like the $500 Glock 19, which patrol cops generally carry.
ESU officers wear beefed-up tactical armor. Items such as bullet-resistant vests start at about $200. Helmets that can stop a bullet from a .44 magnum can cost close to $1,000.
Related: The amazingly quick capture
Even their uniforms are pricey. Heavy duty pants from suppliers like Rothco cost about $50, while the special jackets they wear can retail for about $250.
New York City alone will spend $540 million this year on anti-terrorism efforts by the ESU, police and fire departments.
But fortunately for city taxpayers, the federal government picks up the bulk of that tab -- about $400 million comes from Homeland Security.
Related: Suspect found sleeping outside bar, survives shootout
The federal government also spends hundreds of millions of dollars on counter-terrorism efforts by other agencies in the metro area. The money goes to protect major transportation hubs including LaGuardia and other airports, commuter rail lines and the city's subway system, as well as ocean ports.
Federal anti-terrorism funds also protect landmarks such as the Statue of Liberty and the new World Trade Center and to help hospitals prepare for a potential attack.