Narendra Modi has dominated politics in India for seven years. With broad public support and big majorities in Parliament, the prime minister has pushed through dramatic and sometimes damaging policies. His government has fiercely advocated a Hindu-focused nationalist agenda and used increasingly heavy-handed tactics to silence critics, with little effective opposition.

On Friday, with a rare retreat, Mr. Modi suddenly doesn’t look quite as dominant.

Mr. Modi said that his government would repeal three farm laws aimed at fixing the country’s struggling agricultural sector, in a surprise concession to yearlong protests by farmers worried that the overhauls would ruin their livelihoods.

The government, he said in a televised address, “will begin the procedure at the Parliament session that begins this month. I urge the protesting farmers to return home to their families, and let’s start afresh.”

Mr. Modi timed his announcement for Guru Nanak Jayanti, a holiday celebrated by Sikhs, in a nod to India’s minority Sikh community, who make up the base of the protest.

“Today, I beg the forgiveness of my countrymen and say with a pure heart and honest mind that perhaps there was some shortcoming,” he said.

The speech stunned Indians accustomed to Mr. Modi’s usual stance as a muscular leader impervious to criticism. But it signaled that his standing has weakened amid a variety of problems, including a disastrous response to a second wave of the coronavirus and a struggling economy.