Image copyright EPA Image caption Former Barcelona defender Carles Puyol (right) was a speaker at an event in Madrid in May 2018 with Manchester City coach Pep Guardiola (left)

We have all had bad hair days, times when grooming didn't quite work out, but it's rare we expect our carefully-maintained, glossy locks to land us in trouble.

When former Barcelona football star Carles Puyol accepted a spot to provide World Cup commentary on Iranian television, he probably did not think his trademark long curly hair would be cause for concern.

The footballer was billed to feature in a Channel 3 special programme for the Iran-Spain match on Wednesday, alongside host Adel Ferdosipour.

But after travelling to Iran and to the IRTV 3 Tehran studio, Mr Puyol was denied entry.

You might also be interested in:

A frustrated Mr Ferdosipour, left to host the programme without his Spanish counterpart, told viewers before the match: "You must be aware that Carles Puyol was scheduled to be with us tonight. However, he is in his hotel right now. I did everything I could but it didn't happen. I apologise," ISNA news agency reported.

Initial reporting of the footballer's absence focussed on speculation the star's appearance fee was set too high - but on Thursday a different story emerged.

Mr Puyol was told by the state broadcaster IRIB he could not appear in the programme "because of his looks (long hair)," according to news website Entekhab, who quoted the footballer.

Iran has no official hairstyle policy but state TV is strictly against broadcasting anything considered unconventional or "un-Islamic" by the clergy and the conservative establishment.

The Iranian Football Federation's code of conduct, the Charter of Ethics and Behaviour, says players must not sport hairstyles which help "spread foreign culture," and footballers are occasionally warned for hairstyles deemed inappropriate by the authorities.

The bizarre news prompted many on social media to criticise the broadcaster.

"You have disgraced us around the world, IRTV 3," tweeted reformist journalist Saba Azarpeyk.

@Aaaamiraz asked the question on many people's minds: "Had you not seen Puyol before you spent a ton of money and invited him, only to ban him from appearing on TV?"

Like others taking the opportunity to mock Iran's policies in general, @Aaaamirza also pondered, "Didn't the prophet of Islam [Muhammad] have long hair?"

"Mr Puyol, this is Islamic Iran! We won't let you put Islam in danger with your wild hair!" another Twitter user wrote, sarcastically.

One posted a photo of a female model with long, curly hair along with the caption: "This is how the executives of the state TV see Puyol."

And @Parvazi_ha mocked up a picture of Mr Puyol wearing the chador, a full-length garment worn by religious women: "The first condition to allow Puyol to appear on state TV is to have him don a chador and have him say 'thank God I wear a chador'."

This is not the first time long hair has caused controversy on TV in Iran. Two years ago, Peyman Hosseini, the national beach football team's goalkeeper, was not allowed to appear on TV because of his long hair. When asked to wear his hair up, he refused.

The decision to cancel Puyol's appearance comes just weeks after IRTV3's veteran director Ali Asghar Pourmohammadi was replaced with one closer to Iran's ultra-religious hardliners.

UPDATE: The deputy chief of Iran's state broadcaster (IRIB), Morteza Mirbaqeri said on Saturday 23 June that the story that Carles Puyol wasn't allowed on IRTV 3 as a pundit because of his looks was a "rumour" spread by the BBC.

Conservative Jam-e Jam daily which is owned by the IRIB, quoted Mirbaqeri as saying "the state broadcaster 100% denies this report".