For Iranian rock musician Pooyan Ghandi, the roar of the crowd and the thrill of live performance are things he can only dream about.

The 34-year-old lives in the religious city of Mashhad where concerts have been banned for more than a decade after hardliners in the theocratic state argued that they were against Islamic teachings.

While such restrictions are rare elsewhere in Iran and in Tehran it is possible to see live music, Ghandi and musicians like him in Iran’s holiest city spend their days composing music that they are unlikely ever to play to a crowd.

“There are many like me in Mashhad who are sitting in their room and work with one computer, upload their music and post it on audio streaming platforms,” Ghandi said from his studio in his family home.

“Music in Mashhad has turned into [a symbol of] muscle flexing” between reformists and hardliners, he added. “It is not rooted in religious beliefs because the call to prayer is music. Reciting the Koran is music.”

With centrist president Hassan Rouhani set to step down after two terms, hardliners hope to secure the presidency in a June 18 poll. Three of the seven candidates, including frontrunner Ebrahim Raisi, have their roots in Mashhad, home to the largest shrine in Iran where the eighth Imam of Shia Muslims, Reza, is buried, and a stronghold for hardliners.

If Mashhad’s experience is anything to go by, Raisi’s victory could signal greater social and cultural repression. Raisi’s father-in-law, a leading figure in Mashhad, is one of the country’s most controversial clerics. Ayatollah Ahmad Alamolhoda, 76, banned concerts in Mashhad and has said that women have no right to cycle in the city. The ayatollah has previously voiced concern that some Iranian women were more likely to model themselves on Sophia Loren than Fatemeh, the daughter of Prophet Mohammad.

Pooyan Ghandi

When Raisi last ran for president four years ago, it was rumoured, jokingly, that he would build walls in pavements to separate men and women. “Raisi will manage the cultural sector based on Islamic values,” said Hamid-Reza Taraghi, a hardline politician in Mashhad, voicing his opposition to concerts that promote western values and allow men and women to dance together. This month his daughter said on state television that her father created a women-only section at the Mashhad shrine. He would, she said, make “bridges” for men and women not walls.

But even if Raisi tries to replicate his father-in-law’s plan, analysts say the Mashhad experience makes clear the difficulty of ensuring compliance even in this most conservative of cities.

Despite the religious ban, women can still be seen cycling. Cafés playing recordings of western music have opened. Young women are dressed fashionably and the obligatory head scarves are sometimes worn on their shoulders. Private parties are common. The main difference with other big cities, analysts say, is that if you are arrested for drinking alcohol you will almost certainly be sentenced to lashing with whips.

“Hardliners, if elected, may try to impose more restrictions in the cultural sector but it is very difficult to put Iranians back to the pre-internet, pre-Instagram era,” Majid Fouladiyan, a professor of cultural sociology at Ferdowsi University of Mashhad.

The tougher restrictions in Mashhad have if anything fostered an identity of resistance in the city, he said, a view echoed by others. Mashhad now has the most private music studios in the country, said Ali Alavi, the editor of Khorasan daily newspaper, a conservative outlet in Mashhad. He added: “More than 40 years of ruling shows us that the policies announced cannot be [necessarily] forcefully implemented.”

For most ordinary Iranians, the biggest concern is not moral or social issues but the economy. “We have one of the world’s biggest economic cartels in Mashhad [affiliated to the shrine] but there are people who eat bread with tomato paste in this city,” one analyst said.

With sanctions hitting the economy hard and disillusionment rife, the poor could yet become the biggest threat to the Islamic republic, “maybe even an existential threat”, the analyst said. The first riots against economic hardship were in 2017 and began in Mashhad, which has a population of 3m, and “we can see signs of the uprising of the hungry and bare-feet people here as one-third of Mashhad population live in poor suburbs”, he said.

the eighth Imam of Shia Muslims, Reza, is buried

For many in Mashhad, this disillusionment has fed into a reluctance to vote. “I’m not going to vote ever again. I’ve not been able to save a penny over the past four years,” said Reza, a 37-year-old shopkeeper in a grocery store. “The managers are either weak and powerful or strong and powerless. Why shall I make a fool of myself?”

Still other voters question the hardliner focus on regional policies. For Cyrus Milani, a singer and musician in Mashhad who like Ghandi also works from home, it is difficult to rationalise Iranian support for Syria and Palestine “where they have live concerts” and yet concerts are banned at home. “I am very upset and have little income but I cannot do anything other than making my music,” he said. “This is the first year that I do not know who is running for president and have no plan to vote.”

Other values matter too, people in Mashhad say, not least probity in public affairs and equity. Not far from where Ghandi lives, a 33-storey residential block is under construction by a politically connected man in his 30s, workers at the site said. The English-language billboards suggest the building will have billiard and banquet halls as well as a spa.

For Ghandi, lack of income and restrictions on performance have affected his creativity.

“We would have been able to achieve beyond our dreams. We could have helped promote people’s music taste, performances and quality of music,” he added. “We now see what has happened to music, is happening to bread and butter, too. When a tree [Iran] is not looked after well, first the leaves [music] drop and then it gets closer to the roots.”