Wal-Mart trying to break through India barrier

As the world's second most-populous country with an expanding middle class, India is an obvious place to invest if you're the world's largest retailer.

Unless the country you're trying to invest in keeps putting up roadblocks.

Faced with renewed government pledges to protect the millions of mom-and-pop "kiranas" and other small traders who dominate India's half-trillion-dollar retail sector, Wal-Mart is taking a different tack.

The company said Tuesday it will open 50 more wholesale stores in India over the next four to five years, adding to 20 it already operates. But unlike the familiar warehouse-sized retail outlets, Wal-Mart's stores in India, known as cash-and-carry outlets, will supply goods to the mom-and-pop retailers.

Read MoreWal-Mart sticking with slow and careful in Asia

"Wal-Mart is committed to India and we are excited about our growth plans," Scott Price, Wal-Mart Asia CEO, said in a statement. "We will continue to focus on the cash-and-carry format as we are very happy with the way it has shaped up in the last few years."

India badly needs more foreign investment to fund a wide range of infrastructure projects aimed at spurring an economy that has slowed sharply. But earlier this week, in a closely watched statement encouraging more foreign direct investment, the opposition Bharatiya Janata Party, led by its candidate for prime minister, Narendra Modi, said it "Is committed to protecting the interest of small and medium retailers."

With a potential customer base of more than a billion people, India is a place where retailers like Wal-Mart are eager to set up shop. But for all its potential for a global retail chain, India hasn't been an easy market to break into. And the government has given decidedly mixed signals to foreign retailers trying to get started.

Read MoreSay hello to Wal-Mart's futuristic truck

In 2011, the coalition government led by the Congress party signaled it was ready to write new rules that allowed international companies to open retail outlets with an Indian partner owning a minority share. (India allows foreign companies to run 100 percent-owned wholesale chains.)

But the move to lower barriers to entry for big-box "multibrand" chains sparked a loud outcry from the local retail industry, which employs as many as 40 million people and makes up roughly 15 percent of gross domestic product.

The changes opened the door for a handful of large retailers, including Swedish furniture retailer IKEA, which earlier this year won approval to invest nearly $2 billion in 25 new India locations. Last month, U.K. food retailer Tesco won government approval to set up a joint venture with a local partner, India's Tata Group, to operate a dozen hypermarkets in southern and western India.

Read MoreWill social media be a game changer for India elections?

But as political opposition to big-box stores remained widespread those deals have been few and far between.

Now, as more than 800 million Indian voters go to the polls over the next six weeks, the opposition BJP, which is favored to win control of a coalition government, has made clear it will defend the little guy from the large chains.

For now, foreign retailers will have to confine themselves to wholesale operations as middlemen supplying the millions of small shops that remain protected from larger competitors.

In a recent conference call with investors, Wal-Mart said it was pleased with 20 percent growth in its "cash-and-carry" stores and remains "committed to the Indian market with this strong format."