Thirteen community organizations have written a letter to IRS Commissioner John Koskinen asking the IRS to investigate whether the Walmart Foundation qualifies as exempt under Section 501(c)3 of the Tax Code.

They contend that Walmart directly and wholly controls the Walmart Foundation, and the foundation is governed entirely by senior Walmart executives and has no independent directors of its own. They also accuse the company of using the foundation to award grants in urban communities in which the retail giant wants to build more stores, in the face of opposition from smaller retailers.

The groups, which include the Alliance for a Greater New York, the Grey Panthers, New York Communities for Change, and the Alliance Californians for Community Empowerment, analyzed data from the Walmart Foundation’s Form 990-PFs from 2008 to 2013 (the most recent year available), and found that, in cities such as Boston, New York, Washington, and Los Angeles, donations from the foundation skyrocketed as Walmart pursued plans to open additional stores amid local controversy about the benefits of Walmart’s stores to those communities.

The groups contend that Walmart explicitly promises charitable giving as part of its store expansion package. “When Walmart faces community opposition to new store openings, especially in urban markets, the company often launches a ‘Walmart community’ website aimed at building public support,” said the letter, which was sent Monday to Koskinen. “These websites routinely list charitable giving from Walmart Foundation as one of the benefits of Walmart’s expansion and as part of ‘what’s at stake’ with respect to Walmart’s business plans.”

However, the groups claim the Walmart Foundation precludes grants to those who might cast Walmart “in a negative light.”

Walmart spokesman Kevin Gardner, told The New York Times that the allegations had no merit. “The Walmart Foundation focuses giving in critical areas such as hunger, veterans and disaster relief,” Gardner wrote in an email. “We provide support for these and other important causes in communities across the U.S. and around the world, not just to particular areas or cities, and it’s unfortunate to see criticism of the foundation’s charitable giving.”

The groups contend, however, that the Walmart Foundation advises grantees to promote Walmart, and that recipients of the foundation’s grants are held to strict standards for publicizing the funding they receive from the foundation. All publicity materials need to be approved in advance by Walmart Foundation staff who appear to be employed by Walmart, not the foundation. The grantees are encouraged to name programs funded by the foundation after Walmart itself and are also told to consider inviting Walmart to their events and to interact with the company’s Facebook page.

They pointed out that 501(c)3 organizations are required to ensure that their benefits accrue to the public interest rather than private interests, and there are prohibitions against “private inurement” and “private benefit.” A more stringent prohibition against “self-dealing” also applies to private foundations.