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.