One of the major inflationary forces of 2021 has been the weather.

Wild weather around the world wreaked havoc on markets for raw materials, lifting prices for everything from electricity and heat to houses and breakfast cereal.

Policymakers and investors have debated the effects of fiscal and monetary policy on inflation, but a big reason for rising prices this year has been factors that neither lawmakers nor central banks can do much about. Prices for natural gas, lumber, corn, soybeans, wheat and other building blocks of modern commerce surged to multiyear highs—in some cases records—because of fire, freezes, flood, drought, hurricanes, and some of the hottest weather ever.

Weather is always at play in commodities markets. A freeze in Florida pushes up orange-juice futures. A blizzard in Chicago boosts natural gas prices. A bumper crop floods the market. But this year the weather was steadily extreme and often in ways that sent commodity prices higher.

Low production of fuel and grain due to a years-long energy slump and the trade war with China set the stage for rising commodity prices. The pandemic disrupted output further. From there, the weather took over. “Weather is probably the biggest factor of higher prices,” said Craig Turner, senior commodities broker with StoneX Financial Inc.

It all started in February when Texas froze over. Winter Storm Uri drove up demand for natural gas for heat while clogging wells with ice, which drastically reduced production in the region that needed fuel to stay warm.