Indian PM Narendra Modi has announced the repeal of three controversial farm laws after a year of protests.
Thousands of farmers have been camping at Delhi's borders since last November, protesting against the reforms.
Farmers say the laws will allow the entry of private players in farming and that will hurt their income.
Several rounds of talks with the government over the past few months failed as ministers insisted that laws were good for farmers.
Farm unions will see this as a huge victory. But experts say the upcoming state elections in Punjab and Uttar Pradesh - which both have a huge base of farmers - may have forced the decision.
The surprise announcement on Friday morning came on a day Sikhs - the dominant community is Punjab - are celebrating the birth anniversary of Guru Nanak, the founder of Sikhism.
Mr Modi said the new farm laws were meant to strengthen the small farmers. "But despite several attempts to explain the benefits to the farmers, we have failed. On the occasion of Guru Purab, the government has decided to repeal the three farm laws," he added.
Rakesh Tikait, one of the most prominent farmer leaders, said they would stop their protest movement only after the government repealed the laws in the parliament.
The Samyukta Kisan Morcha (SKM), an umbrella group of some 40 farmers' unions, had refused to back down despite appeals from the government to end their protest.
Farmers continued to block motorways to Delhi through harsh winter and summer months and even through deadly Covid waves. They called for strikes across the country and dozens of them even died due to cold, heat and Covid.
The government initially engaged with them and offered to put the laws in abeyance for two years. But after farmers rejected their overtures, the authorities retreated, preferring to go with the wait-and-watch attitude.
But two things changed in the last few months.
First, the son a federal minister allegedly drove his car into a group of protesting farmers in Lakhimpur in Uttar Pradesh in early October. He denied the allegation, but was arrested. The incident sparked outrage across the country and put the government on the back foot.
Second, PM Modi's Bharatiya Janata Party (BJP) is up against strong regional parties in the upcoming elections in Punjab, Uttar Pradesh and Uttarakhand and the government knows that angry farmers would hurt the BJP's chances of winning the crucial polls.