NEW DELHI (AP) -- Indian lawmakers on Monday repealed agricultural legislation that provoked a year of nationwide protests from farmers, in a move that was seen as a major reversal and rare climbdown for Prime Minister Narendra Modi's government, which had ardently defended the controversial reforms.

The Farm Laws Repeal bill passed the lower and upper houses of Parliament with scant debate - ten days after Modi announced the surprise decision to withdraw the three laws in a televised national address.

Protesting farmers have hunkered down in makeshift camps outside the capital of New Delhi since November of last year to demand the removal of the laws, which they fear would drastically shrink their incomes.

The repeal bill will need to be signed by the president before it is formally implemented. But farmers have said their demonstrations will continue - just last week, thousands of jubilant farmers on tractors, jeeps and cars, waved green and white flags as they rode along highways ringing New Delhi to celebrate their victory, but made it clear that the government has not met all of their demands.

Rakesh Tikait, a top farmer leader, said that they needed government assurances of guaranteed prices for certain essential crops, like wheat and rice - a system introduced in the 1960s to help India shore up its food reserves and prevent shortages. He demanded that the government set up a committee to settle these demands before the famers consider ending their protests.

Farmers form one of India's most influential voting blocs. Modi's decision to scrap the new laws came ahead of elections early next year in key states like Uttar Pradesh and Punjab, both significant agricultural producers and where his Bharatiya Janata Party (BJP) is eager to shore up its support.

Modi's far-right Hindu nationalist party already holds power in Uttar Pradesh, but its support is under pressure over a struggling economy and the government's response to the pandemic. If farmers desert the ruling party, it will not only shrink prospects to form a state government for a second term but also weaken chances for the party to get an overwhelming majority in the 2024 national elections.

Political analysts say these upcoming elections are a major reason behind the surprise move to withdraw the unpopular agricultural reforms, but that it's too early to say whether it will work.

The government initially insisted that the new legislation, which would open the way to a deregulated market and more private-sector control in agriculture, was urgently needed to modernize Indian farming.

But farmers feared that the government's move to introduce market reforms would leave workers poorer. They worried that the laws signaled a move away from a system in which an overwhelming majority of farmers sell only to government-sanctioned marketplaces. This would leave them vulnerable to big corporations that would have no legal obligation to pay them guaranteed prices, they said.