Energy has been one of the top performing sectors in recent weeks, as sanctions on Russia by the U.S. and much of Europe has triggered a global oil-supply shock as the nation is the third largest exporter of petroleum.

Oil prices surged to their highest levels since 2008 earlier this week as Russia's invasion of Ukraine and as Western sanctions weighed on overall outlooks. European Union leaders earlier this week announced the bloc will start phasing out purchases of Russian oil, coal and natural gas, but have yet to set a specific timeline. The United Kingdom said it will stop buying Russian oil by the end of the year, while the U.S. immediately banned Russian fossil fuel imports this week and is in the process of banning natural gas imports as well.

However, prices have somewhat pulled back later in the week as other oil producers work to fill the void in supply to meet demand. Still, U.S. benchmark West Texas Intermediate (USO  ) futures were up 2.7% on Friday to trade at $108.90 per barrel, while international benchmark Brent Crude (BNO  ) futures were 2.3% higher at $111.90 per barrel.

Driven higher by rising oil prices, broad energy sector ETF Energy Select Sector SPDR Fund (XLE  ) climbed over 2% this week, while the SPDR S&P Oil & Gas Exploration and Production ETF (XOP  ) rose over 1% higher.

The new uncertainty surrounding fossil fuels amid geopolitical conflicts, as well as their increased costs, has also made renewable energy investing more attractive, with related ETFs posting double-digit gains in the past week. The Global X Hydrogen ETF (HYDR  ) jumped by 16% this week, while the ProShares S&P Kensho Cleantech ETF (CTEX  ) and Invesco Solar ETF (TAN  ) were up by 14% and 13%, respectively.

Outside of renewables, ETFs tied to oil and gas servicing also rose this week as investors expect energy price gains to increase their profitability this year. Funds like VanEck Vectors Oil Services ETF (OIH  ), SPDR S&P Oil & Gas Equipment & Services ETF (XES  ) and iShares U.S. Oil & Gas Equipment and Services ETF (IEZ  ) were all up around 10% for the week.