Universities across the UK have been accused of adding to climate pollution by investing more than £5 billion in the fossil-fuel industry after an investigation by three campaign groups.

Leading Scottish universities have also been singled out for criticism for their links to oil and gas companies.

Edinburgh University has announced it will review all its investments to ensure they are responsible.

The investigation comes as campaigners prepare to launch a major push to persuade universities and other investors to withdraw their funding for fossil-fuel companies.

The acclaimed American writer and environmentalist, Bill McKibben, is due to bring his "Fossil Free Europe Tour" to Edinburgh later this month.

Ending investments in fossil-fuel companies will start to make them "politically bankrupt", he argued. "It will make their job of dominating the planet's politics that much harder."

Universities have a key role to play in combating climate change, he said. "They are one of the few places in our civilisation where reason still stands a good chance of prevailing over power."

McKibben is the founder of 350.org, which has played an important role in mobilising action to cut climate pollution globally.

Along with the activist group, Platform, and the student environmental movement, People & Planet, it is this weekend publishing a report entitled Knowledge and Power: Fossil Fuel Universities.

The report estimates the total investment of all UK universities in the fossil-fuel industry at £5.2bn - equivalent to £2083 for every student.

Oxford and Cambridge invested by far the most, but Edinburgh was the third largest with £3.8 million in Shell, £3.4m in the BG Group and at least another £5m in other fossil-fuel companies at the end of 2012.

Senior executives from oil giants BP and Shell have also been given 20 awards and honorary degrees by universities in the last 10 years, according to the campaign groups.

Miriam Dobson, from People & Planet at Edinburgh University, pointed out that universities were institutions with a responsibility towards the wider community. "Investing in fossil-fuel companies, which harm communities and destroy the climate, is simply not OK," she said.

A spokeswoman for Edinburgh University said: "We are launching a consultation process with staff and students to gather views and will be putting forward a revised investment policy in summer 2014.''

The report also highlights a series of links between the oil industry and Heriot-Watt University in Edinburgh. The drilling company, Cairn Energy, has funded a professorship and donated £1.4m for a new postgraduate centre.

Cairn's chairman and former Scotland rugby international, Bill Gammell, has been given an honorary degree, as has the former head of BP, John Brown.

In June this year, Heriot-Watt announced a £3m research deal with Shell. Heriot-Watt accepted that it received about £5m a year to fund research into "enhanced oil recovery".

But the universtiy pointed out that it did not invest in the oil and gas industry.

"We must reduce dependence on fossil fuels but also accept the reality that they will continue to be a vital component of energy supplies for the immediate future," said a university spokesman.