The cost of gasoline is rising around the U.S., pushing prices at the pump close to their highest level in four years.

The average national gas price has increased 3 cents to $2.88 per gallon, an unexpected swing given a drop in gasoline demand and growing inventories, according to AAA. Oil Price Information Service said prices are nearing their highest levels in four years.

Rising gas prices could put a dent in consumers' budgets, leading to cutbacks in other areas of spending. Prices may be rising because of concerns about demand, as well as higher prices this summer for crude oil, AAA said.

Get Breaking News Delivered to Your Inbox

"The last quarter of the year has kicked off with gas prices that feel more like summer than fall," said Jeanette Casselano, AAA spokesperson, in a statement. "This time of year, motorists are accustomed to seeing prices drop steadily, but due to continued global supply and demand concerns, as well as very expensive summertime crude oil prices, motorists are not seeing relief at the pump."

The average gas price is the most expensive for the start of October since 2014, AAA said. Prices are now four cents higher than a month ago and 32 cents higher than a year earlier.

The three states around the country with the cheapest gas are Mississippi ($2.57), Alabama ($2.57) and South Carolina ($2.58), while Florida and Michigan have witnessed the biggest increase in gas prices, with a 10 cent hike in both states, AAA said.