“It’s going to be an incredibly long evening, so fasten your seat belts.” That was how Leonardo DiCaprio began his welcome speech at his fourth annual megawatt fund-raiser for his environmental charity, which took place for the third consecutive time Wednesday night in St. Tropez.

His opening bit was actually incredibly (and surprisingly?) self-aware for an evening of Riviera glamour. By the time dinner and the auction had ended, and after both Madonna and Lenny Kravitz had performed—all a little before 3 a.m.—he had raised more than $30 million for the Leonardo DiCaprio Foundation, which is dedicated to climate-change prevention and wildlife preservation.

The majority of the sum came from a multi-lot auction that included gifted art works from Richard Prince, Damien Hirst, Jonas Wood, Cecily Brown, and Rudolf Stingel. A large work by Urs Fischer, who was in the crowd, sold for more than $2.5 million. A brief bidding war ensued between Harvey Weinstein and DiCaprio over a large portrait of the actor in paint and crushed-up plates by Julian Schnabel. DiCaprio, who was on stage and teasing the producer to stop putting his hand up, finally banged the gavel on his winning bid of €400,000.

DiCaprio is one of Hollywood’s most elusive celebrities, known for attending parties but refusing to be photographed at them. In May, at amfAR’s fund-raiser in Cannes, he politely declined to go on stage with Will Smith, Jessica Chastain, and Tobey Maguire to auction off a celebrity group selfie. So, what was perhaps most remarkable about this event was how available he was throughout the evening. He personally helped sell half the auction lots and reminded everyone to keep drinking their rosé to keep the bidding going freely. When a style of Rolex preferred by Steve McQueen was up for sale and stalling at a little over $500,000, he got on the mic and said he would get two of the watches and sell them both to the top bidders, netting a cool mill for his charity.

Leo’s jolly energy set the tone. When Maguire, Sean Penn, and Adrien Brody took the stage to auction a Porsche, the D.J. played “The Boys Are Back in Town.” When Leo came out with Kate Winslet, the song was “My Heart Will Go On,” which earned a sly grin from the actor. At the end of the night, I saw him in the wings of the stage getting down to Kravitz. Was he tired? “We’re in the South of France, where things go a little bit later,” he said.

Madonna was a tougher sell. She performed five songs, with impromptu monologues in between. Some of her jokes fell flat, but the audience was amused as she heckled the crowd. When a man lit up a cigar after, she complained the room was too smoky, then asked for his Black AmEx card and shoved it down her brassiere. She also gave lap dances to the front tables, briefly held Paris Hilton’s face in her hands, and asked the male model Jon Kortajarena to be a backup dancer for “La Isla Bonita.” Lenny Kravitz, who was the finale of the evening, gave a more traditional rock-star performance and brought the house down.

While everyone in that room was popping bottles with models (I’m talking about you, Doutzen Kroes, Jessica Hart, and Imaan Hammam), a chunk of ice the size of Luxembourg was breaking off Antarctica and melting into the sea. Leo made the point clearly: “This is not going to affect our kids. Or our kids’ kids. It’s gonna change the world as we know it.”

Paris Mayor Anne Hidalgo, who earlier this month at the couture shows in Paris presented Karl Lagerfeld with the highest French honor, was given the foundation’s New World Leadership Award for her commitment to bringing about sustainable policies. “All countries and territories are concerned,” she said in her speech. “We need to deliver on the promise of the Paris agreement—it is a political, social, cultural, and economic challenge. Together, we will build a better world for tomorrow.” Trump’s name wasn’t mentioned, but his administration was invoked as an environmental doomsday.

I introduced Tracey Emin, the artist who has kept a home and studio nearby in the South of France and had donated a work of art to the auction, to Leo, whom she hadn’t yet met. Her donation was one of her neon signs and it read: “Because of you I’m here.” She told the actor that it was a prescient work, given the evening that had brought them together. They soon agreed that it would be even better, though, to live on a healthier planet that doesn’t need a glamorous fund-raiser to come to its rescue.

CORRECTION: An earlier version of this article incorrectly stated the value of Leonardo DiCaprio’s winning bid on Julian Schnabel’s portrait. It was €400,000, not $400,000.

Get Vanity Fair’s Cocktail Hour

Our essential brief on culture, the news, and more. And it's on the house.