JERSEY CITY — Pity New Jersey. Buffeted by the misdeeds of corrupt officials, maligned by reality television and blasted by hurricanes, many natives say they grow tired of routinely having to defend their state.

Despite it all, one thing always perked up New Jersey residents: the cheap gasoline.

With prices far lower than in neighboring states like New York and Pennsylvania — the second lowest prices in the country, in fact (only Alaska charges less) — New Jerseyans have long boasted about their bargain-basement fueling costs. The low prices, a consequence of the state’s low tax, also coaxed many thrifty New Yorkers and others over the state line.

But those gas glory days are coming to an end. Gov. Chris Christie has signed into law a new tax that, starting on Nov. 1, will raise gas prices by 23 cents a gallon, effectively putting New Jersey on a par with the rest of the country.

The added revenue will go toward repairing the state’s ailing infrastructure and refilling the Transportation Trust Fund, whose depletion had led the governor to order the emergency shutdown of hundreds of projects to improve roads, bridges and rails.