Indian Prime Minister Narendra Modi on Friday announced the repeal of his government’s controversial farming laws that sparked year-long protests from tens of thousands of farmers across the country and threatened to hurt the governing Bharatiya Janata Party in upcoming state elections.

Modi announced the surprise move in a televised broadcast, saying all three contentious agricultural laws passed by his government in 2020 will be repealed in the upcoming Parliament session.

Modi then urged the protesting farmers to go back home to their family, adding: “Let us make a fresh start.”

Protesting farmers welcomed the prime minister’s announcement with cautious optimism but one of the group’s leaders, Rakesh Tikait, said the protests will continue until the Parliament actually repeals the laws.

Modi’s sudden concession to the protesters comes just months before state elections in three major north Indian states with large farmer populations.

Despite repealing the controversial laws, Modi continued to defend them in his address noting that they were brought for “the welfare of farmers and in the interest of the agriculture sector,” but the Prime Minister lamented that his government “couldn’t explain such a sacred thing to some farmers.”

Many of the protesters belonged to the Sikh minority group and Friday’s announcement also coincided with the Sikh holiday of Guru Nanak Jayanti.