The National Galleries of Scotland is to sever links with the petrochemical giant BP - admitting that its ties were seen at being "at odds" with efforts to tackle the climate emergency.
An announcement from the Scottish Government-funded arts body said it would no longer be hosting the BP Portrait Award show under its current financial backer.
The annual visit of the touring exhibition at the Scottish National Portrait Gallery had been targeted by protesters in recent years.
Major cultural institutions in the UK to have come under increasing pressure from campaigners over claims that companies are “greenwashing” the arts with sponsorship deals.
A long-standing relationship between the Edinburgh International Festival and BP ended in 2016, while the Edinburgh International Science Festival announced this year that it would not be accepting funding from fossil fuel companies.
The National Galleries’ decision was announced days after the Royal Shakespeare Company cut its ties with BP after being targeted repeatedly by campaigners.
It is expected to increase pressure on the Portrait Gallery in London, which organises the annual competition and touring show. The British Museum and Royal Opera House have also resisted pressure to cut their ties with BP.
A four-month run of the exhibition, which is described by the National Galleries as “an unmissable highlight of the art calendar,” will be going ahead in Edinburgh as planned from 7 December.
BP has backed the art competition - which carries a first prize of £35,000 and a total prize fund of £74,00 - for the last 30 years.
The National Galleries' own website describes the BP Portrait Award "as the most prestigious portrait painting competition in the world" and claims that it represents "the very best in contemporary portrait painting."
Its statement announcing its dropping of BP said: "We recognise that we have a responsibility to do all we can to address the climate emergency. For many people, the association of this competition with BP is seen as being at odds with that aim.
"Therefore, after due consideration, the trustees of the National Galleries of Scotland have decided that this will be the last time that the galleries will host this exhibition in its present form.
"The exhibition has been extremely popular with new and existing visitors over the years.
"We are grateful to the National Portrait Gallery in London and to BP for the opportunity that the competition and exhibition has provided to inspire young talent and to promote portrait artists from around the world."
A spokeswoman for the National Galleries confirmed that the BP Portrait Award was its only involvement with the company.
She added: "The trustees have taken account of a wide range of opinions, both within the galleries and beyond, in order to arrive at their decision."
Alys Mumford, spokesman for the BP or Not BP campaign, which has staged several portraits at the Edinburgh gallery, said: "It is extremely significant that yet another major Scottish cultural institution has dropped fossil fuel sponsorship, following the Edinburgh International Festival and the Edinburgh Science Festival earlier this year.
"This is a massive win for campaigners who have taken action against the BP Portrait Award being hosted in Scotland for several years.
"It sends a clear message that it is no longer socially acceptable to have links with the fossil fuel industry because of their continued role in driving the climate crisis and human rights abuses across the world.
"We hope that the few remaining institutions that allow themselves to be used as greenwash for the industry join the National Galleries on the right side of history."
Alex Staniforth, culture spokesman for the Green Party on Edinburgh city council, said: "I’m very pleased to see another bastion of Edinburgh’s cultural life move away from fossil fuel sponsorship.
"The future is not and cannot be in fossil fuels and culture should embrace the future - a future of clean energy - as much as it should be informed by the past.
"I hope that any cultural body still sponsored by the fossil fuel industry will look at it again and ask ‘is the planet really worth it?'"
A spokesman for BP said: "The exhibitions outside of London are a popular and successful part of the BP Portrait Award each year, and are part of our commitment to giving back to the communities where we live and work.
"The increasing polarisation of debate and attempts to exclude companies committed to being a part of the energy transition is exactly what is not needed.
"This global challenge needs everyone – companies, governments and individuals – to work together to achieve a low carbon future."
A statement from the National Portrait Gallery said: "We respect the National Galleries of Scotland’s decision and we are grateful for all the support they've given the award over the years."