MUMBAI, India — So far, India has had to contend with very few known cases of coronavirus. And its leaders are determined to try to keep it that way. On Thursday evening, in a prime-time speech to the nation, Prime Minister Narendra Modi urged his 1.3 billion citizens to “avoid crowds and stay at home.”
“Today, what is known as ‘social distancing’ is very necessary,” Mr. Modi said.
Earlier in the day, authorities also announced a weeklong ban on incoming international flights, beginning Sunday.
The prime minister’s appeal came just in time in the northern state of Uttar Pradesh, where the authorities face an urgent challenge: dissuading hundreds of thousands of Hindus from traveling there next week for a nine-day celebration of Ram, one of the religion’s most important gods.
Devotees believe Ram, also known as Rama, was born in the Uttar Pradesh city of Ayodha, and for generations, they have descended upon it for his birthday festivities. This year, they run from March 25 to April 2, and this time, pilgrims plan to celebrate the start of construction of a new Ram temple in Ayodhya.
Now their faith is colliding with the coronavirus pandemic, which has infected just 173 people in India, according to government data, even as it has sickened more than 218,000 people and killed more than 9,000 worldwide.
“We need to stop this crowd from gathering,” Dr. Ghanshyam Singh, chief medical officer of Ayodhya, told reporters earlier this week.
Public health experts say that large crowds, in which people are unable to keep at least six feet apart, pose a high risk for transmission of the virus.
Religious festivals, Dr. Singh noted, come and go, but public health is paramount. “If life is not there, then there are no celebrations,” he said.
The conflict between religion and health has put the government of Uttar Pradesh — India’s largest state, with 230 million people — in a difficult bind. For several days, officials have been trying to dissuade people from gathering in Ayodhya without actually taking the politically volatile step of forbidding them to do so.
Siddharth Nath Singh, a state cabinet minister who until last August oversaw health issues, said the government had reached out to the main organizer of the festival, the Vishva Hindu Parishad, and other religious leaders to ask that this year, the devout worship Ram at home.
“In matters of faith, the persuasion is best done by religious gurus,” Mr. Singh said in an interview on Thursday. “Already, the V.H.P. is making requests that people should not come out. In their own house, they should hold prayers.”
Led by a tough-as-nails Hindu monk, Yogi Adityanath, Uttar Pradesh is a key pillar of political support for Mr. Modi and for the Hindu nationalist party that he leads, the Bharatiya Janata Party, to which Mr. Adityanath belongs.
About 80 percent of Indians are Hindu, and the Bharatiya Janata Party, or B.J.P., has sought Hindu votes for years with the promise of building a Ram temple in Ayodhya, where a Muslim mosque stood until a Hindu mob destroyed it in 1992, setting off deadly riots. Last November, the Supreme Court settled decades of legal disputes and gave the site to the Hindus.
Mr. Adityanath, who has supported other mass pilgrimages such as last year’s Kumbh Mela, is supposed to help kick off the Ram festival. On Tuesday, just before the event formally begins, he is scheduled to participate in a ceremony to move a revered idol of Ram from a tent to a bulletproof enclosure near the planned new temple.
Late Thursday night, Mr. Adityanath’s office urged the state’s residents to perform religious services at home to prevent the spread of the virus.
Vinod Bansal, a national spokesman for the Vishva Hindu Parishad in New Delhi, said that his group was not directly telling worshipers to go to Ayodhya, but that “people go there uninvited from all over the world.”
“People are getting the opportunity to have glimpses of Lord Rama,” he said. “It’s not appropriate to deprive them of this opportunity. That will be very difficult.”
Anil Purohit, who worked on public health issues for the United States government and also founded the Jodhpur School of Public Health in northern India, said he attended a Hindu festival managed by the Adityanath government last year, and he praised the health precautions it took.
“Indians love to flock to these big festivals,” said Mr. Purohit, who grew up in India and now lives in Boston. Still, he said, allowing next week’s gathering is a bad idea, he said.
“It’s a major risk,” he said.
Indeed, epidemiologists say that religious gatherings in Malaysia and South Korea contributed significantly to the spread of infections in those countries.
Officials in Uttar Pradesh have said that if the pilgrims come, it is prepared with thermal monitors, 100,000 face masks and 4,000 liters of hand sanitizer, according to Newslaundry, an Indian news site.
John Ioannidis, a professor of medicine and biomedical data science at Stanford University, said that if the Ayodhya festival is allowed to proceed, the government could consider asking people to voluntarily be tracked and tested for the virus a few weeks later.
“We know very little about what’s happening with the virus,” he said. “We need data. I’m sure that among one million people, there would be volunteers who would be willing to be tested.”
Mr. Modi’s national call for Indians to stay home, however, may well reduce the flow of pilgrims to a trickle. “I appeal to all of you: For the next few weeks, step out of your homes only when absolutely necessary,” the prime minister said.
Mr. Bansal, the Vishva Hindu Parishad spokesman, was hopeful that everything would work out fine for the Ayodhya pilgrims.
“The local administration and temple trust will decide how these events are conducted smoothly,” he said. “Lord Rama will also help.”
Vindu Goel reported from Mumbai, India, and Hari Kumar from New Delhi. Karan Deep Singh contributed reporting from New Delhi.