NEW DELHI — For generations, millions of Indians here in the capital have celebrated Diwali, the Hindu festival of lights, by setting off a symphony of fireworks.

In the days leading up to the festival, which is on Thursday this year, homes are cleaned, whitewashed and outfitted with oil lamps to commemorate the return of Lord Rama, one of the most revered Hindu gods. On the eve of the festival, fireworks, an important centerpiece, crackle through the night.

But amid concerns about poisonous air quality in New Delhi — stemming, in part, from the use of fireworks — a different scene has unfolded this Diwali season.

After India’s Supreme Court this week reinstated a ban on the sale of fireworks in the National Capital Region, which includes New Delhi and is home to roughly 45 million people, fireworks sellers sat idly outside their closed shops, wondering what to do. For those who rely on fireworks sales for their livelihood, conditions have become desperate. In a busy street in Old Delhi, one vendor of firecrackers doused himself with kerosene and threatened suicide.

Outside his shuttered shop, another vendor, Deepak Srivastava, 36, said: “We are not criminals; we are small businessmen. This is the biggest festival for Hindus. We are totally dependent on this business. Now, we will plan our future differently.”

Air quality has deteriorated in New Delhi for years, but after last year’s Diwali celebrations, a breaking point of sorts was reached. A thick, toxic haze settled over the city for 10 days, mixing with other emissions and pushing levels of the most dangerous air particles, called PM2.5, to 16 times the level that the Indian government deems safe. In response, city officials temporarily shut down more than 1,800 public primary schools.

The Supreme Court stepped in, approving a ban last November on the sale of fireworks in the National Capital Region. The court cited data from the World Health Organization that found the city’s air quality to be the world’s worst, and a report from the country’s Central Pollution Control Board indicating that pollution levels in the region were four or five times as high on Diwali.

After appeals by fireworks manufacturers, the Supreme Court temporarily lifted the ban on Sept. 12. The most recent order, issued Monday, reinstates the prohibition on fireworks until Nov. 1, nearly two weeks after the end of Diwali. But concerns about enforceability persist.

Some environmentalists say the order is too narrowly defined to be effective because it bans just the sale of fireworks, which can still be purchased in neighboring states. Others say upending the tradition of using fireworks to celebrate religious festivals and other important occasions, despite the health risks, poses a challenge.

“I think culturally we have a tradition of burning fireworks, whether it’s at weddings, festivals, or cricket matches,” said Prarthana Borah, India director for Clean Air Asia, an international environmental group. “So it requires a change in perspective.”

Bans on fireworks have been considered in other large Asian cities. In China’s notoriously polluted capital, Beijing, lawmakers rescinded a prohibition on fireworks in 2006 ahead of the Lunar New Year in response to protests.

Deaths and injuries from fireworks in China draw attention to the issue every year. But efforts to curtail their use in India are a relatively new phenomenon, and some people have framed the issue as an attack on Hinduism.

Reacting to the order, Bhupendra Singh, a member of the country’s governing Bharatiya Janata Party, which has ties to far-right Hindu groups, invited “friends from Delhi” to celebrate Diwali in Madhya Pradesh, where he serves as a minister. He said there would be “full freedom” to use fireworks.

Tathagata Roy, the governor of Tripura State, lamented the ban, asking on Twitter whether the Hindu tradition of cremating the dead would be the next practice to come under scrutiny.

Harish Fulara, 35, the father of two young children who like fireworks, acknowledged the health dangers but suggested finding other ways to curb pollution, saying that he wanted to be free to practice his religion. “We see the pollution,” he said, “but we also see our religion.”

Others, including Renu Mehta, 48, whose husband suffers from upper respiratory problems, welcomed the ban. She said responsible restrictions on religious practices should be considered if they affect the well-being of others.

“Pollution is a public problem,” she said. “We just cannot afford any more of it.”

Many retailers are angry. Indians buy an estimated half-billion dollars’ worth of fireworks each year, with most used for Diwali, and about $100 million’s worth are purchased in Delhi alone, according to A. Asaithambi, president of the Tamil Nadu Fireworks and Amorces Manufacturers’ Association.

Maheshwar Dayal, 54, said that his family had run their shop, Magnetic Fire Works, for six generations in the cramped streets of Old Delhi and that the ban enraged him. They have sold their wares to some of India’s most important political figures, he said.

Banning fireworks, Mr. Dayal said, fails to halt more pervasive pollutants in the city. Illegal crop burning by hundreds of thousands of farmers in neighboring states, for instance, accounts for one quarter of the air pollution in New Delhi during the winter months.

“Why ban only fireworks?” Mr. Dayal asked. “What about vehicles, dust from construction and agricultural waste? You are taking away our livelihood. How do we survive?”

In response to the court order, a group of traders approached the Supreme Court on Wednesday asking for modifications. But in the East Delhi neighborhood of New Ashok Nagar, vendors are already preparing to push sales underground.

“People want fireworks, and we want to sell,” said one retailer, who refused to give his name. “Maybe all we need to do is pay more money to government workers to close their eyes.”