The drill, which happened in Greenpoint, starred college students enrolled in the NYPD Cadet Corps as hostages being kept inside the show’s Ritz Carlton Hotel, an iconic location on the Atlantic City boardwalk.

Emergency Service Unit officers responded by helicopter and rappelled down onto the set using ropes.

They then cleared the boardwalk of “civilians” before taking six “terrorists” into custody and airlifting a “wounded officer” to safety.

The cable network loaned the set to the NYPD for the exercise, which re-enacts threat situations similar to those carried out elsewhere in the world.