The author at the Parliament House in New Delhi.Credit…Sonu Mehta/Hindustan Times, via Getty Images

KOLKATA, India — I am a member of the Indian Parliament, and on Sunday, the political party I belong to, the All India Trinamool Congress, defeated the party of Prime Minister Narendra Modi in elections for the West Bengal State legislature. Our party and my leader, Mamata Banerjee, the only female chief minister of a state in India today, showed what it takes to defeat Mr. Modi’s divisive, misogynist politics.

Out of the 292 seats in West Bengal’s state legislature, Mr. Modi and his Bharatiya Janata Party won 77. We won 213 seats. But we weren’t simply fighting to form a state government. We were fighting to stop Mr. Modi’s centralizing, authoritarian juggernaut, which seeks to destroy India’s federalism and its secular character, and transform our country into an autocratic Hindu state.

Mr. Modi and Amit Shah, India’s home minister, have systematically hollowed out the institutions that India held sacred and trusted. During the course of the West Bengal election, I witnessed how they reduced the once-respected Election Commission of India, a supposedly independent body that conducts state and national elections, to an errand boy serving their political agenda.

On Feb. 26, when the second wave of Covid-19 was rising in India, the commission announced that elections in West Bengal would be conducted in eight phases staggered from March 27 to April 29. Four other Indian states were also going to polls, but the commission restricted them to one or two phases.

By scheduling the West Bengal election in this way, the commission made it possible for Mr. Modi to campaign extensively in West Bengal. Indian elections are energetic, festive and crowded affairs. Our party protested and petitioned the commission to limit the election to fewer phases, as a dangerous second wave of Covid-19 had set in. The commission refused to listen.

Mr. Modi and Mr. Shah, whose ministry is responsible for disaster management in the country, held numerous public meetings in West Bengal. Both men often appeared unmasked in the public rallies, setting a terrible example for the tens of thousands who attended and the millions who watched the widely televised events.

Mr. Modi’s government did absolutely nothing to prevent religious gatherings such as the Kumbh Mela, a festival in Haridwar in the northern state of Uttarakhand, where millions of Hindus gathered for a dip in the Ganges River.

On April 17, when India was reporting more than 250,000 new Covid-19 cases, Mr. Modi made a mild and vague appeal to the pilgrims at the Kumbh Mela, asking them to consider going home, and suggested that the festival should be “symbolic.” Yet by late afternoon on that day, Mr. Modi attended a public meeting of over 50,000 people in West Bengal. “Wherever I look, I just see people,” he gloated.

The election was turning out to be a super spreader of coronavirus infections. The commission continued ignoring us while the second wave was battering India’s health care systems. The craven dereliction of duty compelled the Madras High Court to remark that the commission “should be put up on murder charges probably!”

Mr. Modi prioritized pursuit of political power above Indian lives. The vital first three weeks of April, when the prime minister and his cabinet should have been working on ramping up critical health infrastructure and coordinating with state governments to prevent our catastrophic situation, were lost.

India’s women will also remember Mr. Modi’s campaign in West Bengal for its brazen misogyny and toxic masculinity. On April 1, while at a public rally at Uluberia, a city in the state’s Howrah district, Mr. Modi referred to Ms. Banerjee, the leader of my party and the chief minister of West Bengal known affectionately as Didi, as “Didi Ooo Didi!” — to stupendous applause from crowds of men. He continued using that tone and phrase in other public rallies.

To my ears, the tone and phrase were ominously close to what a neighborhood cat-caller may call out to girls walking past. To the Bengali middle class, the prospect of handing over the reins of the state to someone who openly endorsed a practice so much at odds with their sensibilities was frightening. Female voters in West Bengal, who make up 49.1 percent of the state’s electorate, cringed. A majority of women voted for our party. They did not allow such misogynist politics to win the day.

And culture matters. Mr. Modi and his B.J.P. hoped they would win by equating Bengali identity with Hindu culture. They failed to understand that Bengali culture is not a monolith; it combines secularism with non-vegetarianism and a strong contrarian instinct.

We joke that laid-back middle-class Bengalis are content with three things: educating our children, the matinee on Saturday (“shoni bar e matinee”) and a mutton curry on Sunday (“robi baar e mangsho”).

At the very least, the Bengalis reject anyone who wants to control what we eat, whom we love and what we wear.

The Bengal experience has demonstrated that the B.J.P. is not invincible, that all Indians are not attracted to the idea of a majoritarian Hindu state and that Mr. Modi and Mr. Shah are not the master election strategists they are made out to be. Despite their huge financial resources, their misuse of federal investigative agencies to target opponents and accusations that they have been buying off opposition politicians, the B.J.P. can still be defeated by a focused regional party that stays true to its grass roots and a secular, inclusive ideology.

It took a catastrophic pandemic for even Mr. Modi’s supporters to see they need oxygen cylinders more than they need a Hindu state. And it took the Bengal election for the rest of India to realize they don’t need toxic machismo. What India needs in a leader is a heart and a spine.

This story first appeared on nytimes.com