As many as 300,000 drum-beating, poster-waving demonstrators invaded Manhattan on Sunday, sounding the global-warming alarm in what was billed as the largest climate-change protest ever.

The People’s Climate March — whose participants included celebrities ranging from Leonardo DiCaprio to Sting — stretched from the Upper West Side to Midtown ahead of Tuesday’s UN summit on reducing carbon emissions.

“Our mission is to make this a decisive moment,” Mayor de Blasio told the throng. “We in New York City are trying to fuel that moment, that opportunity for profound change.”

He predicted the rally and his rollout of a plan to reduce city emissions by 80 percent by 2050 would be “a turning point.”

The massive march coincided with climate demonstrations across the globe, from Britain to India to Australia.

Organizers of the Manhattan event said more than 500 buses had carried out-of-towners in for the rally, where marchers included former Vice President Al Gore and UN Secretary-General Ban Ki-moon.

Police blocked off traffic on Central Park West from 59th Street to 86th Street to accommodate the army of students, workers, parents, scientists, beekeepers and more who joined the march.

Other marching celebs included actors Mark Ruffalo, Edward Norton and Evangeline Lilly.

Ruffalo said he was there for his kids.

“I want to do my best to give them the best world that they deserve to have,” the “Avengers” star said.

The crowd sounded the “Climate Alarm” with drums, horns and more than 20 marching bands.

Churches across the city rang bells, as Jewish temples blew shofars.

“Hey, Obama, we don’t want no climate drama,” one group of students chanted.

Robin Guenther, 59, of Soho, marveled at the demonstration’s inclusiveness.

“This is great,” the architect said. “What particularly impresses me is the range of diversity. It’s clearly economically diverse. There are laborers, professionals and young people. This is everyone’s issue. It’s to send our own leaders a message that climate change matters.”

Stephanie Grant, 30, a data analyst from Kingston, Jamaica, said she was marching because “people also think it’s later, but it’s already starting to happen.”

“This is amazing. It’s a really good thing. It’s epic,” she said of the march.

Organizers said there were up to 310,000 marchers in New York City. The NYPD does not give crowd numbers.

Several drones flew above the crowd capturing footage. Their operators were told by the NYPD to ground their toys.

The FAA has set a no-fly zone for planes over the metro area for more than 48 hours beginning Tuesday to protect dignitaries at the UN General Assembly.

Meanwhile, in London, organizers said 40,000 people took part in a climate march. Among them was actress Emma Thompson and musician Peter Gabriel.

“This is important for every single person on the planet, which is why it has to be the greatest grass-roots movement of all time,” Thompson said. “This is the battle of our lives.”

And a march in Melbourne, Australia, reportedly drew 10,000 people.

Additional reporting by Aaron Short and David K. Li