The National Trust has invested tens of millions of pounds in oil, gas and mining firms – despite the conservation charity pledging to cut down its own use of fossil fuels and warning about the impact of climate change.

An investigation by the Guardian has found that the trust – which aims to “nurse the environment back to health” – has more than £30m of investments in oil, gas and mining companies, including BP and Shell, held indirectly via a portfolio fund.

The trust has vowed to decrease its own use of fossil fuels across its estates in England, Wales and Northern Ireland in response to climate change, aiming to generate 50% of its energy from renewable sources by 2020.

Hilary McGrady, the director-general of the trust, which has more than five million members and 61,000 volunteers, has previously said: “We are playing our part by ensuring we reduce our dependency on fossil fuels and at every property we are constantly looking at ways to seek out energy efficiencies.”

A 2015 report by the trust warned: “It is abundantly clear to us from across the breadth of places we look after that the impacts of climate change are already increasing, and are a worrying threat to the fragile and venerable places of natural and historic importance that we care for.”

The trust also opposes fracking, not allowing it on its 248,000 hectares of land, “because natural gas is a fossil gas”. However, it has millions of pounds invested through the fund in BP and Shell, both of which have fracking operations. In July, BP invested $10.5bn buying US shale assets from the mining company BHP Billiton.

Fracking, which involves drilling into the earth before a high-pressure water mixture is used to break shale rock and release oil or gas, is highly controversial because of concerns over its environmental impact.

Caroline Lucas, the Green party MP for Brighton Pavilion, has urged the trust to divest from fossil fuels. She said: “It’s disappointing to see a charity so dedicated to protecting our natural heritage undermining its good work with significant support for dirty fossil fuels. We are living through climate breakdown and ecological collapse – every organisation with money to invest must stop funding environmental destruction.

“I’ve been working to persuade parliament to stop investing MPs’ pensions in fossil fuels for years, so I understand this is an uphill battle – but environmental charities should be leading the way. The National Trust must urgently set out a clear path to divesting these funds and supporting firms that make a positive contribution to society instead.”

Mary Creagh, the Labour MP for Wakefield who chairs the environmental audit select committee, said: “Members of the National Trust will be shocked to learn about the scale of the charity’s investments in fossil fuels. My committee has highlighted the financial risks from climate change, and called on large companies to report on their exposure to climate risk.

“National Trust must ‘green check’ its investments, and invest in the low-carbon and sustainable technologies of tomorrow.”

The trust’s 2018 accounts show that it has £166.7m invested in Legal & General Investment Management’s CAF UK Equitrack Fund, up from £164.9m in 2017. As of July, the fund invested 8.89% of its portfolio in Royal Dutch Shell shares and 4.47% in BP.

In addition, the fund has holdings in mining firms including 1.93% of the portfolio in Rio Tinto, 1.53% in Glencore and 1.44% in BHP Billiton. With at least 18.2% of the fund’s portfolio invested in oil, gas and mining firms, it means the trust indirectly invests in them to the tune of £30.3m.

In 2010, BP was responsible for the worst environmental disaster in US history when the Deepwater Horizon oil rig in the Gulf of Mexico exploded, killing 11 people. A US judge ruled that BP was “grossly negligent” in the lead-up to the spill, in which an estimated 4.9m barrels of oil leaked into the Gulf. Earlier this year it was reported that BP was nearing the end of paying out $65bn (£50.6bn) in compensation.

The trust looks after 780 miles of coastline, and more than 500 historic sites including houses, castles, ancient monuments, gardens, parks and nature reserves, as well as the land.

It has an investment pool of £1.3bn, meaning the Legal & General fund accounts for roughly 13% of the total. In 2015, the charity said it was reviewing its investments in fossil fuels.

A National Trust spokesman said: “It’s important to clarify we do not invest in the ‘fossil fuels and mining’ companies, but in the CAF UK Equitrack Fund, which is a UK equity index tracking fund run for charities.

“We adopt a policy of not investing directly in companies which derive more than 10% of their turnover from the extraction of thermal coal or oil from oil sands. We also engage with companies to improve their environmental performance and see our role as one of actively influencing behaviour and driving environmental improvements.”

• The headline on this article was amended on 19 November 2018 to more accurately reflect the story.