An Exxon station in Foggy Bottom, in late February, charges more than $4 per gallon of gas. (Mandel Ngan/AFP/Getty Images)

As gasoline prices surpass $4 a gallon in the Washington area, there may be one winner: Grocery stores with fuel-rewards programs.

Area retailers such as Safeway and Sam’s Club have been promoting sweeping discounts on gasoline in recent weeks. Wal-Mart has started a year-long initiative to give credit card holders 5 cents off each gallon of gas, while Giant has announced a contest that will give shoppers “free gas for a year.”

“Higher gas prices are almost like free advertising for these types of programs,” said David J. Livingston, a supermarket analyst for DJL Research. “Loyalty programs have been going on for years, but when gas prices go up, they tend to become more important.”

Fuel prices have climbed rapidly since the beginning of this year. As of Friday, gasoline prices had risen for 36 consecutive days, according to John Townsend, a spokesman for AAA Mid-Atlantic.

“This is unprecedented. We’ve never seen gas prices rise this high, this early in the year,” Townsend said. “In a time of extremely high gas prices, one of the tips we give people is: Use a rewards program.”

The average cost for a gallon of gas has risen 46 cents, or 14 percent, in the past month, because of shuttered refineries and decreased oil production in Saudi Arabia.

“Right now, we’re paying the highest on record for this calendar day,” Townsend said on Friday, adding that he expects the trend to continue until at least early April. “It’s the most dramatic increase we’ve seen since 2009.”

At Safeway, which introduced a local partnership with Exxon-Mobile in late January, climbing fuel prices have helped drum up interest.

“The program has been very popular,” said Greg Ten Eyck, a spokesman for the chain of supermarkets. “With rising gas prices, it’s become even more popular.”

Giant, which has a partnership with Shell gas stations, has begun offering “5x gas rewards” on select products. At Wal-Mart and Sam’s Club, a new program offers 3-cent discounts per gallon of gas for customers who pay with pre-paid Wal-Mart money cards.

“We know gas prices are putting a strain on our customers’ budgets,” said Molly Philhours, a spokeswoman for Wal-Mart. “They’re really appreciative of the discounts. As fuel prices increase, it’s much more meaningful to them.”

Grocery chains said it was difficult to quantify exactly how fuel-rewards programs affect their bottom line, but analysts agree that the promotions are working.

“You can just see that at gas stations with rewards programs, the lines are much longer,” Townsend said.

Even so, not all supermarkets are eager to jump the rewards bandwagon. Wegmans, which has nine stores in the area, has no plans to start fuel-related promotions, according to spokeswoman Jo Natale.

“In place of awarding rewards or other kinds of gimmicks, we just offer low prices,” she said.

Comparing the rewards

3 Giant

Available at: Shell.

The details: Each dollar spent at Giant translates to one gas reward point. 100 points get customers 10 cents off per gallon of gas.

Maximum discount per gallon: $2.20 (on up to 35 gallons at a time).

3 Safeway

Available at: Exxon-Mobil.

The details: Each dollar spent at Safeway translates to one gas reward point. 100 points get customers 10 cents off per gallon of gas.

Maximum discount per gallon: $1 (on up to 25 gallons at a time).

3 Wal-Mart, Sam’s Club

Available at: Wal-Mart gas stations.

The details: Wal-Mart credit card holders receive 5 cents off per gallon. Those using Wal-Mart money cards and gift cards receive 3 cents off.

Maximum discount per gallon: 5 cents.