The publicly-owned Royal Bank of Scotland has been involved in at least £40bn worth of loans solely to fossil fuel companies around the world over the past six months, according to an analysis by green campaigners, seen by the Guardian.

RBS has played a leading role in funding coal, oil and gas industries in the US, Europe and Asia, despite their major contribution to the carbon pollution that is affecting the climate.

The bank, which is 82% owned by the UK government, is due to stage its annual general meeting at its Edinburgh headquarters on Wednesday. It has come under fierce fire from environmental groups for bankrolling projects that are “environmentally and socially destructive”.

RBS, however, pointed out that it was not the only bank involved in the loans, and that society was “heavily reliant” on fossil fuels. The bank was the biggest lender to renewable projects in the UK, it said.

But the analysis for Friends of the Earth Scotland (FoES) concluded that only £3bn of all the £67bn power and energy loans that RBS helped fund between October 2011 and March 2012 were for renewable electricity projects.

By far the biggest chunk – £37bn – went to oil and gas extraction, refining and distribution industries, with a further £2.5 billion to fossil fuel electricity generation. The remaining £24.5bn were for electricity and gas utilities, networks, financiers and others, where it is difficult to know the level of fossil fuel investment.

The loans included £414m for coal-fired power stations in India, plus investments in the US coal giant, Duke Energy, and the London-based exploration company, Tullow Oil. RBS was also said to be involved in arranging a £7.5bn loan package to the US oil firm, ConocoPhillips, which has been criticised for a spill in northern China and for its links to tar sands extraction in Alberta.

“RBS states that they fully understand the problem of climate change and are contributing to the solution,” said Davina Shiell from FoES. “This research reveals the opposite – that they are continuing to bankroll socially and environmentally destructive projects around the world.”

She went to say that RBS’s assistance to the fossil fuel industry was far greater than that of other UK banks like HSBC, Barclays or Lloyds. “RBS should clean up its act and re-direct its investments to clean technologies,” she added.

According to Labour’s shadow business minister, Ian Murray, the nationalisation of RBS had focused the spotlight on its investment decisions. “The public will be uncomfortable with owning a bank that is investing in industries that contribute to climate change whilst such a relatively small investment is made in renewable energy.”

“The world is changing and RBS must look at its investment profiles to maximise the opportunities for new technologies that mean we can leave a world that is fit for future generations.”

An RBS spokesman said: “Like it or not, our society is currently heavily reliant on fossil fuels to generate the energy we all use. We agree that there is a need to make the transition to low carbon energy sources and that banks have a role to play by supporting the renewable energy sector to increase its capacity.”

He added: “That process will take time, but we are playing our part in supporting that transition. RBS is by far the biggest lender to renewables projects in the UK.”