WASHINGTON — Four bus rides to and from his Northeast Washington apartment to the Walmart in Landover, Md. often consumes half of Jimmy Pegues’ day. But since a heart attack last year pushed the used car salesman into retirement and onto Social Security, biweekly trips for $4 generic prescriptions have become a lifeline to make ends meet.

“I come to Walmart — religiously,” said Pegues, 64, who saves $110 a month over pharmacies in the District of Columbia. “For me, at this point, and at this time in my life, the price is the most important thing.”

D.C. Mayor Vincent Gray’s decision last week to veto a law requiring Walmart to offer higher pay pitted support for a “living wage” against a desire to spur investment and job growth in the city. But for Pegues and thousands like him who cross the city line every day on their way to the Landover Walmart, the battle was about something more basic: low prices.

Gray’s decision brought focus to the flipside of the living-wage debate: that Walmart’s customers are often as economically disadvantaged as those who scrape by on its hourly wages.

According to Walmart, District of Columbia residents in the past 12 months spent more than $40 million at the company’s stores in suburban Maryland and Virginia. The company did not provide information about those shoppers, but nationwide, Wal-Mart shoppers typically earn lower-middle-class wages, live paycheck-to-paycheck and count jobs and rising food and energy costs as their greatest concerns. One-fifth of them have no credit and use only cash when they shop, according to company spokesman Steven Restivo.

In Washington, the demand for Walmart’s prices may be even higher. Nearly 24 percent of the city’s residents receive food stamps, more than anywhere in the nation. A recent study also ranked the District of Columbia with a higher rate of food insecurity than any state except New Mexico, with more than 30 percent of children living in households without adequate food supply or the resources to keep groceries in stock.

A steady stream of vehicles with District of Columbia license plates — on average, once a minute — told the tale on a recent evening at the Walmart in Landover. Three miles from the District of Columbia border, Michelle Smith, an unemployed mother of seven from Northeast Washington, loaded a gallon of cooking oil and a 10-pound bag of sugar into her sister’s car — a few of $344 in groceries she needed to stretch for the rest of September.

Smith’s 14-year-old daughter, Nicole, sat sandwiched between a wall of 64 rolls of toilet paper and a 48-count box of brown sugar Pop-Tarts. Food stamps covered $304 of the haul, with boxed and frozen foods accounting for most since it would be three to four weeks before Smith’s sister could bring her back.

On Thursday, Gray vetoed the so-called Large Retailer Accountability Act, which would have required retailers with corporate sales of $1 billion or more and operating District of Columbia stores of at least 75,000 square feet to pay their employees a “living wage” — no less than $12.50 an hour in combined wages and benefits.

The mayor said the measure would have harmed Washington residents, depriving them of access to Walmart’s inexpensive groceries and other sale items. He said it would have blocked hundreds of jobs planned for Walmart’s new stores — and turned off other retail chains that might have decided the cost of doing business in the District of Columbia was too high.

Barring a last-minute change by one of five council members who voted against the measure in July, it appears likely to die during an override attempt on Tuesday, sending Washington the way of most other major U.S. cities including Chicago, which after its own existential moment over Walmart wages in 2006, now has nine of the stores and a 10th under construction.

For his veto, Gray was lambasted by labor leaders and clergy for bowing to corporate interests and Walmart, which had threatened to walk away from at least three of its six planned District of Columbia stores.

But in an interview following the veto, Gray said the city’s lack of available and affordable groceries and retail — including at the boarded-up Skyland shopping center, where after pressure from Gray, Walmart would put a store near the mayor’s longtime family home — outweighed any urge he had in setting a national precedent.

“One city,” said Gray, using his slogan for city unity, “is being able to have reasonable access for people wherever they are, wherever they live, and nobody can make that argument, frankly, about access to some of these amenities. You look of areas of Ward 7 and 8, they are really food deserts, retail deserts.”

Council Chairman Phil Mendelson, a lead sponsor of the bill for many years, still fiercely disagrees that more Walmarts with their low-paying jobs is the answer. Walmarts moving into the District of Columbia are sure to displace local grocers and retailers, he said, and there’s no guarantee that Washington residents, and not commuters from Maryland or Virginia, will get the work.

“If the answer is we perpetuate low-wage jobs, we’re not helping people,” Mendelson said.

Mark Federici, president of the United Food and Commercial Workers Union Local 400, said the decision will reverberate beyond Washington.

“Walmart wants to be in Washington, in the world’s most powerful city, so they can say that if their [wages] are OK here, they are OK anywhere,” Federici said, as he participated in a protest outside the Landover Walmart this month.

The legislation brought to the fore as strongly as at any time during Gray’s nearly three-year tenure the city’s fault lines over race, class and opportunity. Rebekah Peeples Massengill, author of “Wal-Mart Wars: Moral Populism in the Twenty-First Century,” said she was not surprised the living-wage effort appeared headed for failure.

“For people in underserved areas, Walmart can bring goods that would not otherwise be available, and the trade-offs for what that means for workers at those stores is a very complex moral discussion,” she said.

Messengill found in her work that Walmart’s low wages have helped perpetuate an economy where people depend on the store’s inexpensive goods. But the Princeton University sociologist said its consumer role extends far beyond the poor.

Veronica Harris steered her cherry-red Mercedes C-Class Kompressor near the front of the Landover parking lot on a recent evening. Her shopping list? A toddler-sized Redskins jersey for her nephew. At $24.97, it’s cheap enough that when he outgrows it, Harris expects to simply buy another.

The private foster-care consultant also wandered through the aisles of refrigerated goods, past the Horizon organic fat-free milk for $3.98 — $1.01 less than at Whole Foods near Logan Circle in Washington, and past the piles of Chobani yogurt — 40 cents cheaper than at Yes Organic Market on the District of Columbia’s 14th Street NW.

Harris, who swings by Walmart about once a week on her way to see clients, picked up a guilty pleasure: a $3.30 roll of Walmart’s Great Value buttermilk biscuits.

“I guess I could have gone to Giant, but I like these better,” said Harris, who lives three blocks from the grocery store in Washington’s Columbia Heights neighborhood, as well as Target, for that matter, where the Redskins jersey was only two cents more. But it didn’t have her nephew’s size in stock.

Roy and Precious Borlend wait for rush-hour traffic to quiet down along 16th Street outside their apartment in Northwest Washington when they need diapers and wipes, or milk and juice, for their 2-year-old son. They pack up the family minivan and trek 30 minutes around the Capital Beltway to a suburban Maryland Walmart.

“I love and hate Walmart. You save on everything — everything — but I hate feeling like it is the only place I can buy things because of that,” said Precious Borlend, a public preschool teacher.

The Borlends left with $100 worth of merchandise in bulging bags, and saved perhaps $10 or $20 toward their elusive first home.