For the 40th year, the night sky lit up over the city during the annual Macy's Fourth of July fireworks show with a record level of security on the ground and water below.

It was the biggest display since the Millennium celebration with 56,000 shells exploding into the air, wowing the crowds.

The fireworks synched up with patriotic tunes like ''America the Beautiful" and "God Bless America."

This year's show also featured some new effects, including fireworks that spell out USA and a winking smiley face. 

Pyro-technicians launched fireworks from four barges in the East River between 23rd and 37th streets and from a jumbo barge near the Brooklyn Bridge.

Crowds gathered along the FDR Drive, and in parts of Greenpoint, Long Island City, Hunter's Point, and Brooklyn Heights.  

Those who braved the rain, say it was quite impressive.

"Fireworks over the city. I mean, it's amazing. Absolutely amazing," said one onlooker.

"It's just absolutely beautiful. I did not expect it to be this big. You have to see it in person to really realize how amazing it really is," said another onlooker.

Earlier in the afternoon, Mayor Bill de Blasio and Police Commissioner Bill Bratton addressed members of the department's Critical Response Command unit at an event on Randall's Island.

It was the first time the counter terrorism unit was deployed for the Fourth of July celebrations.

The NYPD said they also put out helicopters, boats, bomb sniffing dogs and radiation detection units.

Officials reassured New Yorkers they will be kept safe while also giving officers in this response unit some last encouraging words.

"As you go forward today, have a safe tour of duty, be alert, work with the public, allay any fears they have. And at the end of the day, they go home safe, we go home safe," Bratton said.

"Please be vigilant out there, be safe out there, look out for each other, and know the people of this city are very, very grateful for all that you do," De Blasio added.

The NYPD said more than 5,000 officers patrolled the events.