Religious police in Saudi Arabia detained a pastry shop’s cross-dressing mascot — for showing a little too much skin.

As part of a promotional campaign, a bakery in Riyadh had the man dress up in a costume depicting an unveiled Muppet-like woman in a blue gown.

He appeared in photographs posted on Twitter and Instagram as he greeted customers – but apparently offended Muslim sensibilities, since in Saudi Arabia, women are required to cover their hair and, in some parts of the country, their faces.

Authorities with the Committee for the Promotion of Virtue and the Prevention of Vice quickly reminded the mascot of religiously acceptable dress code, the Washington Post reported.

The man was seen in images sitting in a vehicle used by the religious police, who enforce the kingdom’s strict interpretation of Islam.

He “expressed regret” about the incident.

Many Saudis reacted to the half-baked crackdown with a mixture of embarrassment and amusement.

One Twitter uses jokingly referred to the poor sap as a female doll who should have been accompanied by a male guardian – as the kingdom requires for women.

“The doll is an irresponsible teenager,” he wrote.

Another man tweeted that the doll “had a lot of makeup on because it wanted to seduce people.”

And yet another man posted a photo of a Muppet-like man on the phone saying, “This is not my daughter and I don’t know her, officer.”

But not all locals found the gender-bending brouhaha to be funny.

A large number of the country’s 28 million people support the religious police, which until recently whacked transgressors with canes and even forced a group of women to go back into a blazing building because they were not covered enough.

Fifteen of those women perished in the fire.

One man tweeted that the offending mascot violated religious law simply by impersonating a female.

The police “are entitled to do this because the doll resembled” a woman, he wrote.