Wal-Mart and its charitable foundation are giving $25 million to support summer programs for youths across the country, including $665,000 in grants for school nutrition, jobs and learning programs in the District.

Mayor Vincent C. Gray (D) is expected to announce the local funding Thursday morning in a news conference at a Columbia Heights recreation center. Wal-Mart said the money would deliver healthful meals to about 26,900 school-age children locally, enroll 120 youths in summer learning programs and provide jobs to 180 District teenagers.

Nationally, the company said the money would provide 8 million meals, 5,000 summer jobs and training to 20,000 children through the National Summer Learning Association.

“Kids should have every opportunity to grow into successful adults and we’re doing our part to make sure that’s the case this summer,” Leslie Dach, a Wal-Mart executive, said in a news release.

The pledge follows a January announcement by Wal-Mart executives, joined in Washington by first lady Michelle Obama, that the company would offer more healthful foods and push its suppliers to do the same.

Being in the good graces of the mayor and city residents is a benefit to Wal-Mart as it attempts to open its first four stores in the District. Company officials have been meeting with residents near the four sites for months and began a direct-mail campaign to residents in April. But at a retail convention in Las Vegas last month, Gray told company representatives that he wanted to see a store at a fifth site, Skyland Shopping Center in Southeast Washington.

Linda Wharton Boyd, a spokeswoman for the mayor, said doing business with the city and making charitable contributions were two separate things.

“There is no quid pro quo because of these charitable activities or any kind of special treatment. Absolutely not,” she said.

Local grants from Wal-Mart and its foundation will go to nonprofit organizations including the YMCA of Metropolitan Washington, Higher Achievement, Capital View Program Center, the Latin American Youth Center, D.C. Hunger Solutions and the D.C. Department of Parks and Recreation.

The Urban Alliance, a nonprofit group in Logan Circle that provides D.C. youths with paid job experience, is receiving $125,000 from Wal-Mart. Executive Director Veronica Nolan said the organization would be able to serve up to 100 more young people than it otherwise would have been able, partly because of city budget cuts.

“Wal-Mart came in at the perfect moment when we were trying to figure out how we were going to be able to continue to service the same number of youth,” she said.

Wal-Mart’s giving program dovetails with Gray’s efforts to provide enrichment activities for the city’s youths during the summer months. Gray created an initiative, “One City Summer Fun . . . Something for Everyone,” which provides a healthy living campaign and free summer meals for school-age children at more than 300 locations. The city’s Summer Youth Employment Program, which provides subsidized work for ages 14 to 21, kicks off Monday.

Wal-Mart is still the target of activists and unions who accuse the company of paying unfair wages and harming small businesses. On Wednesday, more than 100 people gathered on Freedom Plaza outside the D.C. government offices to ask that members of the community have a role in negotiating a community benefits agreement with the chain before it opens any stores in the District.