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 Ayodhya, 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.