The price of gas in the United States is at its highest level since 2008, as Russia's invasion of Ukraine affects the global energy market.

The average price of a gallon of gas increased by 57 cents in a month. The all-time high was in July 2008, when the average price was $4.114 a gallon. That would be equivalent to $5.25 a gallon today.

Russia provides 10 percent of the world's oil and more than a third of the natural gas used in Europe, so the war has set off intense volatility in the energy markets.

Some refineries and traders have stopped buying crude oil from the country. They are pulling back because they are afraid of running afoul of sanctions by dealing with Russia. The leaders of Ukraine are calling for countries to stop buying Russian oil, and American politicians have begun to endorse that action.

The price of crude rose 7 percent to $118 a barrel on Friday. It cost $65 a barrel in December.

Gas prices have already been climbing due to fluctuations in supply and demand. People have been forced to rejigger their budgets because of the higher prices, sometimes by forgoing leisure activities and other times by cutting back on essentials. Inflation reached a 40-year high in January because of high gas prices.

The Consumer Price Index, a closely watched measure of inflation that is coming out on Thursday, is expected to show that consumer prices rose in the year through February and in the month of February. In the year through January, inflation was 7.5 percent, but it has not yet peaked.