Just a few years ago, President Obama refused to shop at Wal-Mart. But his wife now has other ideas.

First lady Michelle Obama joined executives from the big-box behemoth on Thursday to announce a new program to promote more healthful foods. The move was part of her signature campaign to fight childhood obesity, and Wal-Mart pledged to reduce sodium and sugar and eliminate trans fats in the packaged foods it sells to roughly 140 million customers each week - or, possibly now 140,000,002.

"When I see a company like Wal-Mart launch an initiative like this, I feel more hopeful than ever before," the first lady said in a speech at THEARC in Southeast Washington in front of crates of fresh produce. "We can improve how we make and sell food in this country."

The announcement amounted to a very public display of affection for a company that had long been a thorn in the side of Democrats. Five years ago, Wal-Mart was in the midst of a bruising battle with labor groups that accused it of paying low wages and providing stingy health benefits. Then-Sen. Hillary Rodham Clinton returned a campaign contribution from the company, citing "serious differences." Michelle Obama resigned from the board of a Wal-Mart supplier during her husband's campaign.

And Obama himself told supporters at an AFL-CIO forum in 2007 that he would not shop at Wal-Mart.

"Lots has happened since 2007," Obama press secretary Robert Gibbs said Thursday. "I think we're all in a different time."

At least it won't be hard for the first family to find a Wal-Mart. The retailer has announced plans to build four stores in the District as part of its bid to move into more urban areas after saturating rural and suburban America. Several D.C. Council members, including Marion Barry (D-Ward 8) and Chairman Kwame R. Brown (D), attended Thursday's event.

And in the Obamas' home town of Chicago, Wal-Mart has made inroads as well. The retailer opened its first store in the city in 2006 after heated debate over wages and benefits, and last year it won approval for a second location. It is now pursuing its first store in New York City and hopes the first lady's support will help win over opponents in these cities and Washington.

"We'll carry forward that message," said Leslie Dach, executive vice president of corporate affairs for Wal-Mart.

For Michelle Obama, Wal-Mart represents a key ally, albeit a controversial one. It is the biggest grocer in the country and works with a vast network of more than 60,000 suppliers. One move by Wal-Mart can ripple throughout the industry, and the company has grown increasingly bold in tackling complex social and political issues.

"We are obviously conscious about where we walk and who we walk with," said Sam Kass, assistant White House chef and coordinator of food initiatives. "But it was clear that this is potentially transformative."

In recent years, Wal-Mart has reached out to Democrats. During the debate over health care, it broke ranks with business groups by supporting the controversial mandate for employers in Obama's health-care legislation. It has emerged as a leader in sustainability and carbon reduction, improving fuel efficiency for its supply trucks and vowing to eventually produce zero waste.