Last week, India's ruling Bhartiya Janata Party (BJP) faced a massive rebuff in the local legislative election in Delhi. The Aam Aadmi Party (AAP), a relatively new and small political party, swept the polls, winning 62 seats and leaving only eight for the BJP in the 70-member Delhi assembly.

Delhi does not have the status of a full state and the election for its assembly used to be rather low-key until 2015 when the BJP made it a high-pitched affair. That year, Prime Minister Narendra Modi himself led its campaign but, despite deploying his huge party machinery, he faced a humiliating defeat at the hands of the then-novice AAP, securing only 3 seats.

This year, the BJP's campaign in Delhi was led by Amit Shah, India's home minister considered to be Modi's right-hand man and close confidant, but he too was unable to lead the party to victory.

While some opposition-minded commentators welcomed the BJP's defeat in Delhi as a crack in its monopoly of power, what happened in this election cannot be celebrated.

The BJP's electoral defeat is not really a sign of its political weakness or the decline of its political project. To the contrary, the Delhi election demonstrated that, in fact, the ruling party has been successful in pushing its political opponents to the right and forcing them to play by its rules. It is also continuing to shape the Indian electorate, carving out of it a Hindu constituency that fully embraces its Hindu nationalist agenda.

Campaigning on anti-Muslim sentiment

As in previous election campaigns, in Delhi, the BJP's leadership focused its efforts on inciting anti-Muslim sentiment to rally the Hindu vote. In fact, the party tried to turn the election into an anti-Muslim vote, using recent Muslim protests to scare its constituency.

In late January, Shah exhorted constituents to "press the button [of the electronic voting machine] …with such anger that the current reaches Shaheen Bagh".

Shaheen Bagh is a Muslim-dominated neighbourhood of Delhi that has witnessed persistent protests against the Citizenship Amendment Act (CAA).

The CAA gives ethnic and religious groups, excluding Muslims, from the neighbouring countries of Afghanistan, Pakistan and Bangladesh the right to apply for Indian citizenship and is considered by many as anti-Muslim.

Taking advantage of the Muslim face of the anti-CAA protests, the BJP tried to create a Muslim scare in the minds of Hindus, claiming that the Shaheen Bagh protests were a threat to the integrity of India and that the protesters were traitors and agents of Pakistan.

The AAP maintained a studied silence about the protests throughout the campaign. Not only did its leaders keep a physical distance from the sites of the protests, where its electorate was expressing its apprehensions about the policies and intentions of the ruling Hindu majoritarian party, they even refrained from making statements about it. They argued that the elections were about the state of Delhi and should be fought on issues of public amenities like water, electricity, health and education.

Then when BJP functionaries accused the AAP of sponsoring demonstrations, the AAP's leader, Arvind Kejriwal, felt compelled to respond. He accused the BJP of trying to make the vote about the protest and claimed that if he had power over the police force, he would have cleared "the Shaheen Bagh area in two hours".

Political commentators applauded the AAP for its smart move in not taking the ideological bait thrown by the BJP by sidestepping the contentious issue. In private, AAP leaders were reportedly saying that speaking against the CAA at this juncture would be seen as being "pro-Muslim" and would alienate Hindus.

At the same time, Kejriwal also made an effort to prove his Hindu credentials by using Hindu symbolism in his campaign. He went as far as reciting the Hanuman Chalisa, a devotional hymn to Lord Hanuman, and visiting a Hindu temple on the eve of the election to prove his piety.

In the end, the AAP's strategy proved successful. Hindus, especially low-income communities, voted for a party they saw as an efficient provider of basic services like water, electricity, health and education. Muslims, on the other hand, had no choice. They made a tactical decision to support the AAP, despite its silence on their victimisation, as the other opposition party - the Indian National Congress - stood no chance.

By now Congress, which has spoken out in defence of the Muslim community, has become thoroughly discredited in the eyes of Hindu voters as "pro-Muslim" thanks to the BJP's relentless attacks. The party, which governed Delhi for 15 years up until 2014, won no votes in this latest election.

Shaping the Hindu voter

Some have wondered why the BJP invested so much and raised the stakes so high in an election that bears no major political significance, especially given the fact that the re-election of the AAP was a foretold story.

For the BJP, the Delhi election was not as important as the electoral platform it offered to promote its Hindu nationalist vision.

One has to remember that, for the last six years, in all elections, wherever they have been fought, the BJP has presented itself as a party concerned with the interests of Hindus, a category it uses interchangeably with Indians. It has carefully excluded Muslims from its political messaging and sought to systematically demonise them.

The BJP is trying to work on the Hindu mind and transform it to an extent where it defines itself only in exclusion of or opposition to Muslims.

It wants the self-image of Hindus to be that of a tolerant, progressive, modern and liberal people who face the threat of decimation by an overbreeding, obscurantist, fanatic and anti-modern Muslim community. Hindus have to see themselves as the first and authentic carriers of Indian nationalism and view others as latecomers, lesser Indians who need to be kept under observation, nationalised and disciplined in proper Indian manners.

The growing political distance between Hindus and Muslims further aggravates the situation and deepens the mistrust that Hindus nurse towards Muslims. The BJP keeps harping on these faultlines and, by doing so, is shaping a Hindu vote bank.

In the long term, the transformation of the Indian electorate into a Hindu one would guarantee the BJP's indefinite stay in power.

This process is also forcing opposition parties to adopt the BJP's rhetoric and policies in order to stay "relevant" on the political scene. As parties like Congress are slipping into obscurity with their stance in defence of pluralism and minority rights, survivors like the AAP have a chance of "winning", at least at a local level, by keeping silent on "Muslim issues" and backing the anti-Muslim policies of the central government.

In this sense, the huge majority the AAP got in Delhi by using this strategy is no solace to Muslims.

The AAP had backed the abrogation of article 370 and division of the state of Jammu and Kashmir, which Muslim communities have protested against. Most of the opposition parties have also welcomed the announcement of a Ram temple trust, which is to raise funds to build a Hindu temple at the location of the destroyed Babri mosque.

With their complicity, central policies targeting Muslims will continue unabated and India will keep going down the majoritarian path that the BJP has put it on.

The views expressed in this article are the author's own and do not necessarily reflect Al Jazeera's editorial stance.