Modi's Hindu nationalist Bharatiya Janata Party (BJP) was a distant second behind the upstart Aam Aadmi Party, or Common Man's Party, led by former tax inspector Arvind Kejriwal, according to exit polls released after voting ended.
Millions in the Indian capital voted Saturday in a key regional election, with exit polls suggesting a big defeat for right-wing Prime Minister Narendra Modi.
An average of nine exit polls showed Kejriwal's party was likely to win 52 out of 70 seats.
"We are winning by a huge margin," tweeted Manish Sisodia, the deputy chief minister of Delhi.
Federal Home Minister Amit Shah, who had campaigned vigorously for BJP highlighting his tough stance on national security, called a meeting of party members late Saturday.
Earlier in the day long lines had formed outside New Delhi polling stations amid heavy security as a weeks-old protest by women against a new citizenship law took centrestage.
In an often vitriolic election campaign, Modi and other BJP leaders had slammed opponents of the law who deem it anti-Muslim.
The BJP had been seeking to oust Kejriwal, the capital's chief minister whose party took a record 67 of 70 Delhi assembly seats in 2015.
While Kejriwal focused on local issues including the heavily subsidised electricity, water and healthcare he introduced, BJP leaders sought to turn the vote into a referendum on the women's protest.
Hundreds have been blocking a main road through Shaheen Bagh district since December 15 in protest against a controversial legislation that offers a fast-track to Indian nationality for persecuted religious minorities from neighbouring countries but excludes Muslims.
On the eve of the elections, the BJP sent out messages telling people to vote for the party if they wanted an end to the Shaheen Bagh demonstration.
With the BJP on the back foot after failing in recent state elections in Maharashtra and Jharkhand, analysts said the Delhi result will be a key test of opinion on national issues.
Near the women's protest site, food company senior executive Maroof Ahmad said the "BJP has only two agendas - Shaheen Bagh and Pakistan. They have nothing else to talk about."
"GDP is falling, the economy is in a mess and they are only bothered about temples and mosques," he added.
But others lined up behind the prime minister.
In the affluent Jangpura neighbourhood, flower garlands and balloons decorated the polling station as financial consultant Vinod Kumar came to vote.
"I am not biased towards any political party but I don't endorse the Shaheen Bagh protest. Mahatma Gandhi and Jawaharlal Nehru believed in and supported the citizenship law," he said referring to India's revered independence leaders.
Thousands of extra security officers were on duty for the election with a large contingent at five polling stations near the Shaheen Bagh protest.
Women's safety has increasingly become an issue in Delhi since a 2012 gang rape murder made international headlines.
In a bid to persuade more females to vote, authorities set up dozens of women-only "pink polling booths" across the capital.
"I still don't feel safe in Delhi, a lot more must be done," said Shweta Laxmi.
More than 14 million people were eligible to take part in Saturday's vote. The results will be announced Tuesday.