A Greenpeace ship protesting against deep sea drilling by a British oil firm in the Arctic has been confronted by a Danish warship, and its captain threatened with arrest.

The Danish navy has warned Greenpeace that the Esperanza will be boarded by armed personnel if it breaches a 500-metre exclusion zone around two wells drilled off Greenland by the Edinburgh-based oil firm Cairn Energy.

The confrontation came as scores of climate protesters targeted Cairn Energy's headquarters and six other businesses in Edinburgh during a day of action to protest against the funding of oil and gas industries by the Royal Bank of Scotland. The protests led to the shutting down of the RBS headquarters on the eastern edge of Edinburgh for the day, with thousands of staff told to work from home or other RBS offices. Twelve Climate Camp activists were arrested during the protest.

The protesters say RBS is the most significant backer of oil, gas and coal mining of any British bank, arranging or directly loaning £13bn to "dirty" fossil fuel industries since the government bailout in October 2008. That includes directly funding companies exploiting energy-intensive tar sands in the Canadian wilderness.

Eight protesters dressed in black took a fake pig dripping molasses to the headquarters of Cairn Energy, which has become the focus of environment protests over its drilling in the Arctic and its business dealings with the Indian mining company Vedanta.

The protesters claim Cairn has been given £117m in loans and equity by RBS last year, almost half of which was used to fund Cairn's Arctic drilling operations.

As climate camp protesters smeared the fake oil at Cairn's front entrance, Friends of the Earth Scotland attacked the company for selling a large part of its Indian drilling operations to Vedanta, which has been widely accused of abusing human rights and the environment at a bauxite mine on Orissa.

Ben Stewart, a Greenpeace spokesman on board the Esperanza, said the boat was being circled by three Danish military boats but the protesters were staying outside the exclusion zone.

He said: "It seems crazy to us that the Arctic sea ice is melting, and the oil industry response is to start drilling here, rather than take melting sea ice as a warning about the huge risk to humanity from global warming."

Morten Neilsen, the deputy chief of Greenland police, said his officers were reacting as they would with any demonstration. "Since this is out in water, it would be quite impossible to send a patrol car. If we want a police presence, it has to be by boat," he said.

He refused to comment on whether Danish special forces were involved but said Greenpeace was observing the instruction to remain outside the exclusion zone.

RBS denies that it had directly funded Cairn's Arctic exploration, saying this was a risky form of investment which needed different types of funding. The bank did lend Cairn Energy money and arrange other loans, but neither it nor Cairn would confirm the sums involved.

The oil company said it and the Greenland authorities abided by some of the world's strictest safety and environmental rules. "

We've put procedures in place to give the highest possible priority to safety and environmental protection," the company said.

This year's climate camp protests were more muted than in previous years. At Heathrow in 2007 where the protests were supported by local residents furious at plans for a third runway, there were violent clashes with police and missiles thrown, with injuries and arrests. At Kingsnorth in Kent in 2008 the climate camp claimed credit for helping derail plans to build a major new coal-fired power station with untested carbon capture and storage facilities.

At the RBS's £335m headquarters in Gogarburn, around 500 campaigners spent the last four days gathering at the camp, which occupied two meadows inside the perimeter fence, mounting sporadic actions against RBS buildings over the weekend which led to a further 10 arrests and damage to six windows.

Today's direct action targeted the headquarters of Forth Energy in Leith, which plans to build large biomass power stations at ports around Scotland, where five protesters who chained and glued themselves to the building.

Seven protesters were arrested after gluing their hands together to create a human chain blocking a car park at a major RBS administration building in Edinburgh Park business estate, while branches in central Edinburgh were occupied and targeted, some by protesters drenched in molasses to symbolise oil, leading to several further arrests.

A group of protesters, including Fringe performers, shut down the Nicolson Street RBS branch. Three individuals superglued themselves across the front doorway, while another group played music and danced while handing out leaflets. There were three arrests.

After the previous group of protesters was removed by police, a group of "tar-covered" protesters shut down the Nicolson Street RBS branch a second time, as several activists locked themselves onto the building.

Late in the afternoon, activists confronted the RBS HQ with a six metre tall mock siege tower on wheels, with a life-size papier mache rhinoceros head mounted on the front. This led to two arrests.

A banner was dropped from a building reading "oil tar sands = environmental chaos". There were two arrests.