Students at St Andrews University have voted to boycott Royal Bank of Scotland (RBS) because of its "unethical" and "destructive" investments in support of the exploitation of tar sands in Canada.

A heated meeting of the Student Representative Council agreed last week to move the Students' Association account to another bank in protest at RBS's backing for what environmentalists describe as one of the most climate-wrecking projects on Earth.

"Tar sands [extraction projects] are a major threat to human rights and the global environment and we want to make sure that our union does not support it," said Lauren King, a member of the St Andrews students' branch of environmental group One World, which has been campaigning for a ban on RBS.

King said she visited Alberta last summer with campaigners from the People and Planet student network to learn about the impact of extracting oil from under the ground by strip mining. She said she was horrified to see toxic waste leaching into rivers, and local communities suffering from cancers previously unknown in the region.

King added: "By agreeing to boycott RBS, the Students' Association of St Andrews University is promoting human rights and environmental awareness to young people across the country."

Patrick O'Hare, president of the Students' Association, said: "Tar sands are one of the world's most destructive extraction practices, a literal scraping of the oil barrel when we should be investing in renewable technologies and reducing energy consumption.

"I'm pleased that the union is now putting its money where its mouth is. I would urge other students' unions around the country to follow suit and stop banking with RBS until they halt their investments in tar sands [projects]."

Financial managers will now research more ethical alternatives to RBS, and the matter will be discussed again at the Students' Association board next month.

RBS has been accused of supplying loans worth nearly £5 billion since 2007 to companies involved in extracting oil from Canadian tar sands. The bank has pulled out of sponsoring Climate Week next month, the UK's largest campaign to cut climate pollution, following earlier protests.

RBS maintained that it had not provided finance "directly" to tar sands extraction projects for the last four years.

A bank spokesman added: "We are the biggest financier of renewable energy projects in the UK, with two-thirds of our total energy project finance going to renewables."