Commodity exchange traded funds have enjoyed greater investment interest this year as a recovery in oil prices and resurgence in safe-haven gold bets helped attract steady inflows.

Investors threw more than $50 billion into commodities this year, the best start to a year since 2009 when commodity assets were at the start of a three-year boom, the Financial Times reports.

The new money, along with rising prices, have helped raise commodity assets under management to $235 billion, up from a low of $161 billion at the end of 2015.

According to BlackRock data, commodities-related exchange traded products attracted $27.7 billion in net inflows over the first six months of the year, compared to the $7.7 billion in net inflows for the same period last year and the total $12.0 billion in inflows for all of 2015.

The SPDR Gold Shares (NYSEArca: GLD), which tracks a basket of physical gold bullion, has been the most popular ETF play of the year, attracting $13.2 billion in net inflows, according to ETF.com.

SEE MORE: A Bright Precious Metals ETF Outlook

Barclays pointed out that precious metals, notably gold, have captured around 60% of all commodity inflows this year and believes 2016 could be the best year on record for gold-backed ETFs.

“Much of the investor demand this year been tactical and, unless the asset class continues to generate strong returns in the second half then outflows could resume,” Barclays analyst Kevin Norrish told the Financial Times. “Our price forecasts for key commodities like copper and oil suggest a flat to negative second half of the year, which is likely to encourage some net liquidation.”

Commodities were the best performing asset class of the first half of the year, outperforming global bonds and equities. The Bloomberg Commodity Index was up over 14% over the first six months of 2016. However, since the start of July, the commodity index fell 6.5%, largely due to the drop in crude oil prices, which recently dipped into a bear market.

SEE MORE: Commodity ETFs in Bull Market for First Time in Four Years

The PowerShares DB Commodity Index Tracking Fund (NYSEArca: DBC) is now only up 7.0% year-to-date after falling off 8.0% over the past month.

For more information on the commodities market, visit our commodity ETFs category.