After several weeks of low fuel costs, average gasoline prices in the United States have fallen back to $4 a gallon due to recent violence in the Middle East and rising tensions between the US and Iran. The national average price of regular gasoline was $4 a gallon on Monday, compared with $3.14 a gallon during the same period last year, according to motor club federation AAA.The average hides significant differences across countries. Motorists in many states have already been paying more than $4 per gallon for some time, while prices elsewhere remain low. This variation is driven by factors including local fuel supply and state tax rates.The latest increase follows a period of softening prices. The national average first went above $4 a gallon in late March and fell below that level in mid-June. Fuel prices continued to ease after an interim agreement was reached between the US and Iran, which led to lower crude oil prices. At the time, President Donald Trump expressed frustration that gasoline prices were not falling as quickly as oil prices.That trend has now reversed as crude oil prices have risen in recent days after the US and Iran launched more attacks, raising concerns that the two countries are moving closer to resuming a full-scale war.Its influence is not limited to the United States. People in countries around the world are also facing higher fuel costs as a result of the war.Increases in gasoline prices can also have broader economic effects, with higher fuel and oil prices able to drive up the prices of groceries and other goods. Fuel affordability is also likely to remain an important issue for voters in the upcoming US midterm elections.Meanwhile, in the oil market, global benchmark Brent crude rose 3.2% to $90.95 a barrel, while US benchmark crude rose 2.8% to $84.04 a barrel.