VARANASI, India — As he ran for reelection, Prime Minister Narendra Modi paid a visit to this city of narrow lanes and innumerable temples on a curve in the Ganges River and said he was doing God’s work.

Modi inaugurated a project in March that will radically transform the heart of Varanasi, Hinduism’s holiest city, by carving a wide path from its most important temple down to the river. 

“It seems that God has chosen me” for this task, said Modi, who represents the city in India’s Parliament. “This is sacred work on Earth.”

On Thursday, Modi and his Bharatiya Janata Party won a crushing victory in India’s six-week long election with a potent appeal to nationalism and Hindu pride. 

Modi’s win is a triumph for the ideology he represents, which some critics say tears at the fabric of a country that includes many religions, languages and cultures.

To Modi and his party, India is fundamentally a Hindu nation, where the priorities of the majority take precedence and the secularism promoted by the country’s founders has no place.

Few things exemplify Modi’s ambitions for this nation of more than 1.3 billion people better than the temple corridor initiative. Often dubbed his “dream project,” it combines devotion to Hinduism and modern infrastructure in a showpiece meant to enhance the country’s stature in the eyes of the world.

To his supporters, it is Modi at his best. They see him as a bold, visionary leader who prioritizes Hindu traditions and seeks to demonstrate India’s status as a rising power, whether by building the world’s tallest statue, sending a probe to land on the moon or creating a bullet-train route.

But to his detractors, the project is proof that he is a divider who is damaging Indian pluralism with strident assertions of Hindu identity. They say it is the work of a leader with a dictatorial streak who prizes loyalty above all and will not admit when he falls short of his audacious goals.

The spiritual life of Varanasi is focused on the Ganges River, where each day scores of pilgrims walk down the stone steps — called “ghats” — to wash away their sins in its holy waters. It is a place where Hindus believe they attain “moksha” — salvation — if they are cremated here upon their death. 

Most of the construction near the river — densely packed lanes sprinkled with temples and historic waterfront mansions — dates to the 18th century. But the city, also called Kashi, has been inhabited continuously for thousands of years. 

Until recently, the Kashi Vishwanath Temple — the city’s most famous temple, devoted to the Hindu god Shiva — was enmeshed in the old city, with tens of thousands of pilgrims snaking through narrow alleyways each day to reach it. 

Now the Modi government has embarked on a dramatic transformation of the area that includes demolishing nearly 300 buildings to redevelop a 12-acre site that will link the temple to the river, which is a quarter-mile away. It’s an effort akin to razing nine football fields of space in the Old City of Jerusalem. The corridor will include a large plaza, arcades, a museum as well as amenities like public lockers and toilets. 

The project is “very close to [Modi’s] heart” and will be “a very important milestone in developing Kashi,” said Vishal Singh, secretary of the Varanasi Development Authority, who is overseeing the $75 million project. There are those who have “an open mind and want the place to be better, then those who just want things to stay the way they are.”

The corridor’s opponents say they are not against change, only the extreme nature of the renovation and the lack of input from the community. 

The lanes could have been widened and rehabilitated, rather than flattened, some say. Instead, authorities began buying houses and demolishing them last year. Even now there is no publicly available blueprint for the project. The first announcement of what the corridor would look like came in a simulation tweeted by Modi two months ago.

Those against the project often note with bitterness that Modi had promised to make Varanasi more like Japan’s Kyoto, also a city of holy temples on a river. 

“There they saved their culture,” said Sanjeev Ratna Mishra, whose shop was demolished to make way for the corridor. “Here we threw it into the mud.”

Swami Avimukteshwaranand, who heads the Vidya Math, a Hindu religious institution in Varanasi, said that last year, several groups of people came to tell him that small temples and religious idols were being destroyed in the demolition process. When he went to see for himself in April 2018, he was shocked to find broken idols strewn at the site. He bowed down in front of the debris and asked forgiveness. 

“In our history, many, many times kings thought they were divine,” he said. “Modi believes himself a god.”

Singh, the project’s supervisor, denied that any temples were demolished and said that those found would be preserved. Two temples previously in the basements of private homes were buried by the work, he said, but authorities intend to build new ones aboveground. 

The corridor is also raising anxieties among Varanasi’s large Muslim community, which accounts for about 29 percent of the city’s population. The Vishwanath Temple, with its golden spire and domes, sits adjacent to the bulbous white domes of the Gyanvapi Mosque. Right-wing Hindu activists have long expressed a desire to tear down the mosque, in much the same way they destroyed a 16th-century mosque in Ayodhya in 1992. 

Avimukteshwaranand said that several such activists had urged him to support the corridor project because they said the space it is clearing would make it easier for a large group to damage the mosque. He refused. 

The mosque is surrounded by a high security fence, but many Muslims are still worried.

“The future is very bleak,” said S.M. Yasin, 71, a senior official with the body that oversees the Gyanvapi Mosque. The building, he said, “can be damaged at any time.” 

 Those involved with building the corridor say it incorporates layers of security for the mosque and will bring much-needed improvements to the area. Such projects “are bound to generate a degree of dissatisfaction,” said Bimal Patel of HCP, the Ahmedabad-based firm that designed the corridor. But it is important, he said, to “have the courage to do what needs to be done — to me, that is what the prime minister is saying.”

In Modi’s first term, he brought other new infrastructure to Varanasi, a traffic-clogged city that is home to more than 1.2 million people. A smooth new four-lane road links the airport with downtown, and authorities are working to move tangled overhead electrical cables underground.

But his high-profile promise to clean up the Ganges has fallen short. Vishwambhar Nath Mishra, an engineering professor and religious leader in Varanasi who heads a foundation that monitors the river, said the quality of the water has not improved in Modi’s tenure. 

Meanwhile, with the temple corridor project, Modi is harming the “living heritage” of Varanasi, Mishra said, a city known for its twisting lanes leading down to the wide sweep of the Ganges. “He’s trying to change the DNA of this place.”

Utpal Pathak contributed to this report.