The cast of “After Midnight” whooped it up so enthusiastically Tuesday in celebration of the show’s seven Tony nominations that the cops were called.

But unflappable Broadway legend Tommy Tune defused the situation.

Tune, a huge fan of the show, who’s won nine Tonys himself, hosted a swanky soiree for the cast at his Upper East Side penthouse, sources said, including stars Vanessa Williams, Dulé Hill and Adriane Lenox.

Members of the musical’s orchestra also arrived and broke into an impromptu jam session that raged into the early hours. That’s when the neighbors called the cops to break up the jamboree.

When the officers arrived, a spy said, “unperturbed” Tune invited them inside to “join a Champagne prayer circle” to celebrate the show. And the officers did!

The bash continued more quietly. The production, which has also starred Fantasia Barrino, k.d. lang and Toni Braxton, is up for Best Musical.

Also up for awards are Lenox, director/choreographer Warren Carlyle and costume designer Isabel Toledo, among others.