The 7-1 vote came less than two months after the council required retailers like Walmart to study how so-called "big-box" stores would affect the economy and traffic. Opponents of the measure said it amounted to a ban.
Wal-Mart Stores Inc. gathered more than 50,000 signatures after its setback in December to force a special election this year that would have cost taxpayers up to $3.4 million at a time when the nation's eighth-largest city is weighing severe spending cuts.
"Those are $3 million that could be used for fire, or police, or parks, or libraries," said Council President Tony Young, who voted to repeal the ordinance after supporting it in December. "It's been a really tough fight, but we also have to keep in mind that we do have a fiduciary responsibility to the city of San Diego."
The world's largest retailer is a frequent target for community activists and labor unions, but its win in San Diego is the most significant since Chicago approved that city's second Walmart store last year. Aided by a weak economy, Walmart has said it is getting letters from mayors looking for it to invest in the communities and create jobs.
The San Diego ordinance, adopted days before two new council members took office, applied to stores of at least 90,000 square feet with at least 10 percent of the floor space dedicated to nontaxable items such as groceries and prescription drugs.
Last week, Walmart announced plans to build 12 stores in San Diego over the next five years, creating 1,100 permanent jobs and 300 construction jobs. It said the new stores would help communities that are underserved by grocers.
The Bentonville, Ark.-based company welcomed San Diego's change of heart Tuesday. Walmart currently has four stores - and no Supercenters - in San Diego.
"Thanks to this vote, we will be able to provide the people of San Diego with improved access to affordable and fresh food, particularly for those living in underserved neighborhoods," said spokeswoman Maggie Sans.
The vote came as Walmart is trying to open stores in New York City after failing twice because of community opposition.
Nearly 100 people signed up to speak before San Diego's council Tuesday, most of whom wanted the ordinance to stay in place. Many in the audience wore stickers that read, "Protect Our Neighborhoods!"
"They're going to close small businesses, they're going to limit our choices," said longtime resident Vicki Miller, 52.
Councilwoman Marti Emerald, the lone dissenter, drew cheers from the audience when she yelled that her vote was not for sale.
Councilman Todd Gloria, who initially supported the measure, joined Young in changing sides, also citing concerns about the cost of an election.
"Let's be clear, this is a dark day for democracy," he said.
Others criticized former council members for passing the measure during their final days in office - first in November and again in December to override Mayor Jerry Sanders' veto. They also said the policy was misguided because it limited consumer choice.
"You do not want the city of San Diego telling people where to shop," said Councilman Kevin Faulconer.