Just as U.S. drivers were getting used to falling gasoline prices, pump costs increased for the first time in six weeks, the government said on Monday.

The national price for regular unleaded gasoline jumped 2.2 cents over the last week to $2.98 a gallon, up almost a penny from a year ago, the federal Energy Information Administration said in its weekly survey of service stations.

The fuel price is still far from the record high of $3.22 a gallon reached on May 21.

Pump prices had been falling in recent weeks because of growing gasoline inventories from high motor fuel imports and more refineries coming back online to make gasoline.

The jump in pump costs mirrors a rise in crude oil prices, which account for about half the cost of producing gasoline. The EIA had also warned that gasoline prices were likely to increase again in July and August as vacation driving picks up.

In the EIA's new weekly survey, gasoline was the most expensive on the West Coast, down 2.6 cents to $3.08 a gallon. Among major cities, San Francisco had the highest fuel costs at $3.24, down 2.6 cents.

The Gulf Coast states had the lowest price by region at $2.86 a gallon, up 0.7 cent. Houston had the cheapest pump price at $2.76 a gallon, down 1.6 cents.

The EIA also reported gasoline prices were down 1.2 cents to $3.15 in Chicago, down 2.3 cents to $3.09 in Los Angeles, down 1.9 cents to $3.05 in Denver, down 0.7 cent to $3 in New York City, up 0.1 cent to $3 in Miami and down 1.7 cents to $2.97 in Seattle.

Separately, the average price truckers paid for diesel fuel increased 2 cents to $2.85 a gallon, down 6.9 cents from a year ago.

The West Coast had the most expensive diesel at $2.99, up 1.5 cents, while the Gulf Coast had the most affordable diesel at $2.79, up 1.9 cents.