When clocks struck nine across Tehran on Tuesday, the night skies filled with sound in celebration of the 47th year of the Iranian revolution.

We listened from our hotel balcony as chants of God is greatest rose from rooftops and roared from windows. Fireworks flared in a kaleidoscope of brilliant colours. But this year, in this annual explosion of light and sound, there was a discordant note.

We heard death to the dictator shouted too from somewhere in the darkness of the city, from the safety of spaces indoors. It was a dramatic echo of the extraordinary wave of protests, which swept some streets and squares of Tehran last month. They were met with unprecedented lethal force and a huge loss of life unseen in previous uprisings.

It's our first trip to Iran since the protests, as the authorities slowly lift their near total internet blackout, described as one of the longest digital shutdowns in history, and gradually allow a small number of international media to return.

The mood in the capital is in stark contrast to our visit last June, at the end of the 12-day war with Israel, which also drew in America's attacks on Iran's nuclear sites. That deadly conflagration had left many residents, including those who fled Tehran for safer cities, shaken by the blistering attacks and cemented their attachment to their country.

Now, this sprawling metropolis set against the stunning, snowy Mount Damavand is decked out in flags and bunting to mark what's known as the ten days of dawn. In 1979, this period ushered in a historic revolution that ousted the shah, totally transformed Iran, and created a radical axis of resistance among its allies across the region which has long been condemned and confronted by its enemies.

This year, the days are overshadowed by discontent and defiance over everything from the soaring prices of everyday goods hitting people’s pockets, to calls which sounded on streets last month for an end to clerical rule. These internal pressures, compounded by US President Donald Trump's warning of more military strikes if diplomacy fails, now pose an unparalleled challenge to Iran's ageing theocracy.

On the last day of these anniversary events, the streets of the capital and other major cities were flooded with the government's most loyal foot soldiers - a political reply to the protests. There was a festival air on this public holiday as families marched and meandered in a warm winter's sun. Children and adults waved Iranian flags and photographs of Supreme Leader Ayatollah Ali Khamenei, chanting their signature slogans of death to America and death to Israel.

When I asked one young woman about the protests, she replied: There were people protesting who were dissatisfied with the economic situation, and their protest was legitimate. But she added, It is clear that those who rioted, and brought about chaos, had intentions which originated from beyond our borders.

The day before, on our first day in Tehran, we stopped by Enghelab (Revolution) Square on a drizzly grey day to try to get a sense of the mood in this city. Soaring murals, brightly painted, of smiling crowds dominate building facades around this busy roundabout. But a dark pall seemed to hang over this space, with some Iranians hesitant to speak due to the perceived dangers of voicing dissidence.

Yet, many people, when asked about their primary concerns, immediately expressed outpourings of anger and pain. Many voiced worries about the crippling economic situation, where skyrocketing food prices and unemployment dominate their lives. The Islamic Republic of Iran now stands at a crossroads, confronting its most consequential tests since its own uprising almost half a century ago.

The BBC's chief international correspondent Lyse Doucet is reporting from Tehran on condition that none of her material is used on the BBC's Persian Service. These restrictions apply to all international media organisations operating in Iran.