Correction: An earlier version of this article misstated India’s rank in the 2012 World Giving Index, as well as how many countries were involved in the index. Both numbers have been corrected.

Students in Satya Bharti School, state of Punjab, India. The school is run by the corporate philanthropy arm of the Bharti group of industries. Now, under a new law, the government has mandated corporate social responsibility. The law — which applies to both foreign and domestic companies — requires that all large corporations in India with profits of about 78 million dollars or more annually in the country must spend at least 2 per cent of their profits on community development projects. (Courtesy of Bharti Foundation)

When the charitable foundation of a leading Indian conglomerate tried to set up free schools for rural children, it endured boundless red tape and the wrath of cane-wielding villagers worried about losing their land.

Seven years later, Bharti Enterprises’ charitable foundation has overcome those obstacles and is running 254 schools across India.

But now, a strict law enacted by the Indian government will force corporations such as Bharti to do such projects — and perhaps much more. For example, one of the firm’s most important units, Bharti Airtel, will have to spend almost four times as much on its social development programs, from its current $4 million to $15 million.

The corporate responsibility law — which applies to both foreign and domestic companies — requires that all firms that generate profits of about $78 million or more annually in the country spend at least 2 percent of those earnings on community development projects.

If they don’t, and fail to give valid reasons for noncompliance, they could face fines or even imprisonment for top executives, officials say.

India’s government believes that the law will bring aid to the needy at a time when the wealth of corporations and some individuals has soared but philanthropic giving remains low, fueling resentment. About two-thirds of India’s 1.2 billion people live on less than $2 a day, according to the World Bank.

“In the last few years, there has been a perception of [a] growing trust deficit between rural communities and large companies that make billions of dollars,” said Sachin Pilot, India’s minister for corporate affairs, in an interview. “If the company invests in corporate social responsibility, it will go a long way in reducing acrimony and strife between the two.”

But the new law has rattled many in the corporate sector who say making philanthropy mandatory amounts to political interference and could dampen investor confidence and lead to corruption. The move comes at a time when the economy has stalled, the value of the rupee has plummeted and foreign investment has dipped 37 percent in two years.

“Anything that is made mandatory can be misused,” said Anu Aga, director of Thermax, an engineering company that funds education nonprofits. “If your heart is not in it and you are forced to do it, then it is easy to find wonderful ways to dodge.”

The rule comes on the heels of several official decisions that make it more difficult for foreign companies here to do business, including import restrictions, court rulings overturning patent protections for some drugs, and new land acquisition norms that make it harder and more expensive to set up a factory.

India slipped to the 60th position out of 148 economies in the Global Competitiveness Index this year because of inadequate infrastructure, inefficient bureaucracy, mazelike tax laws and corruption.

Still, Richard M. Rossow, director for South Asia at the McLarty Associates consulting firm in Washington, called the charitable-giving rule “an annoyance but not a deterrent.”

“There are other issues that have significantly contributed to the diminishing of the India brand in recent times,” he said.

Indians have long donated money to temples and given drinking water and food to the poor. Corporations — particularly in India’s tech industry — have set up programs for digital literacy in villages and encouraged employee voluntarism.

Despite the new prosperity of the past two decades, though, the country still ranks low in giving compared with the rest of the world.

India was listed 133rd out of 160 countries in the World Giving Index last year, below neighbors such as Sri Lanka and Nepal. Despite efforts by Microsoft founder Bill Gates and investor Warren Buffett to sign up more Asian billionaires to their “Giving Pledge” — an agreement to give the majority of their wealth to charity — only one Indian has committed to it. That man, Azim Premji, the chief of the tech company Wipro, donated an additional $2.2 billion in February to the education foundation he runs.

Philanthropy experts say that one reason the country ranks so low on such indexes is that wealthy Indians prefer to give their fortunes to their children. In addition, individuals and corporations fear that their money could be misused by unscrupulous charities. While there are laws to regulate charities, there is little actual monitoring or transparency.

Under the new law, the boards of companies will now have to scrutinize their charity projects and post information about them on their Web sites. Over the next few weeks, officials will finalize the rules of implementation of the law and specify what kind of programs count.

Pilot said that companies will have wide latitude but added that sponsoring sporting events will not be considered corporate social responsibility. If an activity is earning a company more rupees than goodwill, then it will not be regarded as part of compliance with the law, he said.

“The government is not wielding a stick and playing Robin Hood. Let the companies and communities decide what programs to implement, and let the board evaluate it,” Pilot said. “It has to satisfy the company’s conscience. Does it bring a smile on the faces of poor families living around its area of operation?”

Some experts who track corporate social behavior trends say that India is promoting an outdated model of corporate responsibility. Activists have criticized companies that run village schools even as they pollute local water sources, and firms that claim to have worked to uplift tribal communities for decades but do not have a single member of the group in their senior management.

“What matters more is how you make your money, not how much money you set aside for social programs,” said Wayne Visser, who teaches sustainability leadership at Cambridge University and is author of the book “The Age of Responsibility.” “It will become a bit of tick-box kind of an exercise if nothing changes in how they run their businesses.”

Business philanthropists see many potential gray areas in the new law.

“They say if it benefits the business, it is not” corporate social responsibility, said Rita Soni, chief executive of Nasscom Foundation, set up by India’s tech companies. “If a company adopts sustainable practices, employs people with disabilities, introduces energy-efficient lighting and recycles water in its offices, will that fit the new rules?”