LOS ANGELES – Gas prices are creeping up nationally, now pennies a gallon away from their highest level since 2014, just in time for the November midterm elections when California will vote on rolling back its gas tax.

Average prices topped $2.90 a gallon for unleaded Wednesday for the first time since June, having risen about 6 cents a gallon in the past month, the Oil Price Information Service reports. If they rise by about another eight cents, they will be the highest in four years.

That could spell trouble at the polls Nov. 6 since voters often have gas prices in mind when they cast ballots. In California, which is second only to Hawaii as the state with the highest fuel prices, voters will decide whether to repeal a tax that raises $5.1 billion a year for road and bridge repair and public transit. Oppoes.

Gas prices are rising nationally because strengthening global economies and international politics have boosted oil prices.

"It's been about demand growth worldwide," said Tom Kloza, global head of energy analysis for OPIS. And when it comes to sanctions on Iran, a major oil producer, "there's no shortage of scary comments" that inject fear into the market and drive up prices further.

The Trump administration is in the process of re-instituting sanctions on Iran after pulling out of an agreement negotiated under President Barack Obama that would limit that nation's nuclear development. On Wednesday, benchmark U.S. crude rose 1.6 percent to $76.41 a barrel in trading in New York in a week in which it hit a four-year high.

In addition, the Organization of Petroleum Exporting Countries, OPEC, is hoping for rising prices as it heads toward a Dec. 6 meeting, said Patrick DeHaan, senior petroleum analyst for GasBuddy.com. He noted, however, that gas prices usually fall after the peak summer driving season, not rise.

"I think we have a pretty good shot at seeing $3 a gallon if the OPEC or Iran (situations) continue to fan the flames," DeHaan said.

In California, perennially the top state for gasoline consumption, prices will only have to rise another penny or two a gallon to hit their highest level since July, 2015, he said. On Wednesday, self-serve unleaded averaged $3.77.

If prices hold or rise further through election day, that might help proponents of repealing an excise tax that went into effect last year that added 12 cents to every gallon in the Golden State.

A repeal could ricochet into similar movements around the country: "At least 10 states in the last few years have increased their gas taxes," DeHaan said.

In a rally Wednesday near Los Angeles International Airport, Mayor Eric Garcetti said that in Los Angeles alone, the excise tax is funding billions in dollars in transportation projects – from replacing aging bridges to filling potholes.

"I would rather pay a few cents more at the pump than a lot more money to a mechanic" to repair pothole damage, Garcetti said.

WATCH: Here's what drives the price of oil