The People’s Climate March in New York has attracted nearly 400,000 people, say organizers, making it the largest climate march in history.

The march aims to shine a spotlight on environmental issues ahead of the U.N. Climate Summit on Sept. 23. U.N. Secretary General Ban Ki-Moon took part in the two-mile march through the streets of Manhattan, along with musician Sting and actors Leonardo di Caprio and Mark Ruffalo. Former vice president Al Gore and New York Mayor Bill de Blasio also were present.

Attendance at the New York march dwarfs the 50,000 people who took part in the Forward on Climate rally in Washington, D.C., last year, and the 80,000 who attended a march at the U.N. Climate Change Conference in Copenhagen in 2009. Organizers had predicted that more than 100,000 demonstrators would attend the Manhattan march.

The New York march was the largest of 2,646 events taking place in 156 countries, according to organizers.

“We said it would take everyone to change everything -- and everyone showed up,” said Eddie Bautista, executive director of the New York City Environmental Justice Alliance, in a statement.

To calculate the attendance, organizers used a crowd density analysis formula developed by a professor of game theory and complex systems at Carnegie Mellon University. The formula calculated average crowd density over specific intervals, factoring in the surface area covered by the crowd and the speed and duration of the march.

The Climate Summit, which President Obama is expected to attend, is timed to coincide with the start of a new U.N. General Assembly session. Advocates for a climate agreement are hoping that the event will breathe new life into the U.N.’s green agenda.

The U.N. has suffered a number of blows in its push for a climate agreement. Australia’s new government, for example, recently repealed its two-year-old national carbon tax, and countries such as Canada, Russia and Japan have refused to sign on for an extension to the Kyoto Protocol to combat greenhouse gases.

Dan Simmons, vice president for policy at the Institute for Energy Research, a Washington, D.C.-based free market think tank, told FoxNews.com that public desire for greenhouse gas reductions should not be over-stated.

“Environmental activists have tried really hard in recent years to raise the profile of greenhouse gas issues,” he said. “Limiting greenhouse gas is not something that the majority of Americans consider one of the most pressing issues of our time.”

Simmons highlighted the results of a recent Gallup poll where economic problems were cited by 41 percent of respondents as the most important problem facing America. Just 1 percent of respondents cited the environment and pollution, according to the poll.

Last week, in preparation for the Climate Summit, the U.S. outlined its plan for a possible global climate agreement. The Summit is seen as key milestone on the path to an agreement.

Follow James Rogers on Twitter @jamesjrogers