A version of this article first appeared in CNBC’s Inside Wealth newsletter with Robert Frank, a weekly guide to the high-net-worth investor and consumer. Sign up to receive future editions, straight to your inbox.

The Iran war has propelled oil prices

to above $94 a barrel, up about 30% since the conflict began in late February. That rally has been a boon for investment firms of ultra-wealthy families who made opportunistic bets on oil in recent years.

Since the pandemic, private equity funds and other institutional investors have backed away from oil and gas in part due to pressure from environmentally conscious stakeholders. Family offices have stepped in to fill some of that void, investors and advisors told CNBC.

While many family offices are environmentally minded — with a September survey by Citi Private Bank showing more than half of respondents reporting they were likely to make sustainable investments in the next five years — they’re not subject to the same ESG mandates as private equity firms or endowments, which have faced pressure to divest from oil and gas.