PepsiCo Inc. has agreed to withdraw lawsuits against Indian potato farmers it alleged infringed a patent by cultivating a variety grown exclusively for its Lay’s potato chips.

The U.S. snack food and drinks maker, which in addition to filing the lawsuit against the four farmers in April had sued five other potato growers, had said it wanted to settle the issue amicably.

“After discussions with the government, the company has agreed to withdraw the cases against the farmers,” a PepsiCo India spokesperson said on Thursday, adding that this applied to all nine growers.

The decision comes at a particularly sensitive time in India, which is about halfway through a 39-day general election in which its rural population still has a dominant voice.

Indian agriculture workers sort through piles of potatoes in a field on the outskirts of Mathura in Uttar Pradesh state, India, on Feb. 22, 2018. (AFP/Getty Images)

It also follows intervention by an influential Hindu nationalist group with close ties to Prime Minister Narendra Modi’s ruling Bharatiya Janata Party (BJP), who said PepsiCo was coercing the farmers.

Modi and the BJP are seeking a second term and most political strategists think they are likely to succeed.

Moral victory for farmers

PepsiCo, which did not disclose details of its consultations, had previously said the farmers must either sell their potatoes to the New York-based company or stop cultivating the FC5 variety. In return, PepsiCo would withdraw the lawsuit.

PepsiCo, which set up its first potato chips plant in India in 1989, supplies the FC5 variety to a group of farmers who in turn sell their produce to it at a fixed price.

Ashwani Mahajan, who heads the organization Swadeshi Jagran Manch, the economic wing of Rashtriya Swayamsevak Sangh, which is the ideological parent of Modi’s BJP, welcomed PepsiCo’s move as a moral victory for Indian farmers.

“MNCs [multi-national corporations] need to understand that they must honour Indian laws,” Mahajan said.

PepsiCo maintains that it developed the FC5 variety of potato, which has a reduced moisture content to make snacks such as potato chips, and registered the trait in 2016.

The April lawsuit was filed in Ahmedabad, the business hub of the western state of Gujarat, requesting that the court restrain the four farmers from growing the FC5 variety.

PepsiCo had also sought more than 10 million rupees (nearly $193,000) each from the farmers.

An Indian farmer harvests potatoes at a field at Arial village near Allahabad, India on March 12, 2013. (Sanjay Kanojia/AFP/Getty Images)

The state government of Gujarat, ruled by Modi’s BJP, had assured the farmers that it would help them, while the opposition Congress party had also criticized PepsiCo’s action.

“The company remains deeply committed to the thousands of farmers we work with across the country and towards ensuring adoption of best farming practices,” the PepsiCo spokesperson said.

PepsiCo, the second large U.S. company to face such patent issues in India, is keen “to find a long-term and amicable resolution” of the issues involving seed protection, he said.

Stung by a long-standing intellectual property dispute, seed maker Monsanto, now owned by German drug maker Bayer AG, withdrew from some businesses in India over a cotton seed dispute with farmers.