Paris Hilton lost her $2 million engagement ring while partying at a huge Miami club — and the hysterical heiress had security scour the venue until the enormous diamond was finally discovered in an ice bucket at another VIP table.

The enormous 20-carat diamond engagement ring from fiancé Chris Zylka flew off Hilton’s finger into the packed crowd while she danced in the early hours of Friday to a set by British DJs Above & Beyond at industrial former soda factory RC Cola Plant at Mana Wynwood, a nearly 50,000-square-foot venue with a 7,000-person capacity, witnesses said.

After an exhaustive search of the VIP area — led by an astonishingly calm Zylka, 32, and an army of security, while distraught Hilton, 37, waited nervously in floods of tears — her giant rock was miraculously found in an ice bucket two tables down from where Hilton had been partying.

A witness told us, “Paris was dancing with her hands in the air, and the next minute her giant ring had flown off. She was really panicked as the venue was packed and very dark, it was the early hours of the morning and it was crazy in there.

“Security started an exhaustive search of the VIP area with torches, led by Chris and with the help of other patrons. There was a frantic scramble with everyone looking for it, people were crawling on the floor, under tables, under other people’s feet, and under seats. Miraculously they found the ring in an ice bucket two tables down.

“It was amazing that they managed to even see that huge diamond in an ice bucket. Paris cried with relief when it was safely back on her finger.”

Hilton’s engagement ringGetty Images

Trance trio Above & Beyond, whose fourth album, “Common Ground,” debuted at No. 3 on the Billboard Chart last month, posted a note on Twitter just before 4 a.m. Friday: “@ParisHilton nice to meet you and glad you found your ring.”

Above & Beyond members Jono and Paavo with Hilton and Zylka

The socialite-turned-top DJ is in Miami for the city’s music week, and is spinning at the SLS Hotel in South Beach on Saturday night.

Hilton didn’t tweet back about the ring scare, but she still kept her sense of humor, posting an “Infinity War” meme at around 8 a.m. Friday which lit up social media, based on the upcoming Marvel “Avengers” movie, which features dozens of superheroes and so is said to be “an epic crossover event.”

Actor Zylka had popped the question on the ski slopes in Aspen just before New Year’s Eve 2017, handing Hilton the gigantic, pear-shaped sparkler.

Diamond expert and celebrity jeweler Michael Greene later described how the 20-carat center stone was set on a platinum split shank halo band, which boasts another two carats of smaller diamonds and is valued at close to $2 million.

He said Zylka had requested the design because Hilton had told him she loved her mother Kathy’s pear-shaped diamond.

Hilton has been proudly flashing off her giant ring and said after the engagement, “The ring was so gorgeous and sparkling. I was shaking as I put it on. It is the most beautiful ring I have ever seen!”

The couple, who had been dating for two years before their engagement, and are now busy planning their wedding, which we’re told they hope will happen by the end of this year.

A rep for Hilton didn’t immediately comment and reps for the venue could not be reached.