David Cameron, Nick Clegg and Ed Miliband have signed a joint pledge to tackle climate change, which they say will protect the UK’s national security and economic prosperity.

The agreement of the three party leaders is highly unusual and comes amid a general election campaign that is becoming increasingly bitter.

The prime minister, deputy prime minister and leader of the opposition have all clashed over green issues, but the joint declaration states: “Climate change is one of the most serious threats facing the world today. It is not just a threat to the environment, but also to our national and global security, to poverty eradication and economic prosperity.”

“Acting on climate change is also an opportunity for the UK to grow a stronger economy, which is more efficient and more resilient to the risks ahead,” the joint statement says. “It is in our national interest to act and ensure others act with us.” A senior UK military commander has warned previously that climate change poses as grave a threat to the UK’s security and economic resilience as terrorism.

The declaration was hailed as “inspiring leadership” by Al Gore, former US vice president and by multinational business leaders as a clear message that the UK is a good place for climate-friendly investment. The cross-party agreement in the UK contrasts sharply with the US, Australia and Canada, where right-of-centre politicians argue against the need to act on global warming.

The world’s governments have pledged to tackle climate change and have set a UN summit in Paris in December as the deadline for a global deal. The Conservative, Liberal Democrat and Labour leaders have pledged “to seek a fair, strong, legally binding, global climate deal which limits temperature rises to below 2C”, the level seen as the threshold of dangerous global warming.

The leaders have also pledged “to work together, across party lines, to agree [UK] carbon budgets”, which are required by law but which caused serious cabinet clashes in 2011.

The leaders’ third pledge is “to accelerate the transition to a competitive, energy-efficient low-carbon economy and to end the use of unabated coal for power generation.” The UK green economy has grown strongly, even during the years after the global economic crisis in 2008, and employs about a million people, but has been hit by political uncertainty due to rows over wind farms and solar power.

“This agreement represents inspiring leadership and true statesmanship by all three men,” said Gore. “The political courage it represents on all sides is exactly what our world most needs in order to solve the climate crisis.”

Paul Polman, CEO of Unilever, said: “The importance of this pledge cannot be overstated. In this critical year, this sets a terrific example for other countries to follow.” Polman warned in an article for the Guardian this week that “powerful vested interests in high-carbon businesses are desperately opposing these changes”.

Juergen Maier, CEO of Siemens, which started building on a £310m wind turbine factory in Hull in January, said: “The low-carbon transition represents a major economic opportunity and this demonstration of cross-party support sends a clear message that the UK remains a good place for global companies to do low-carbon business.”

The joint statement, brokered by the Green Alliance and other NGOs, was released on Saturday, the same day that the Go Fossil Free movement persuading investors to dump their fossil fuel stocks is holding a global day of action, with events in over 50 countries. The fast-growing divestment campaign has already seen 180 institutions worth a combined $50bn get rid of their fossil fuel investments, including local governments, universities, churches and health-care providers.

A series of analyses have shown that the coal, oil and gas industry already have three times more fossil fuels ready to be extracted than can be burned, if the pledge by the world’s governments to keep global warming under 2C is to be kept. The campaigners argue that the fossil fuel industry is therefore not just a threat to the climate, but also to investors’ money, as trillions of dollars is being spent exploring for fossil fuels that will be worthless if climate change is tackled. Archbishop Desmond Tutu, told the Guardian in 2014: “We need an apartheid-style boycott to save the planet.”

Banks that fund fossil fuel investments are also being targeted on the day of action in the UK, South Africa and Australia. In the UK, at least 1,400 people will switch their accounts away from the big five banking groups in protest at the £66bn they invested in fossil fuel extraction in 2012 alone.