A 14-year-old boy was arrested in Saudi Arabia on Tuesday after a video surfaced online that showed him dancing to the 1993 international hit "Macarena" in the middle of a pedestrian crossing in Jeddah.

The teenager walked to the middle of the crossing as cars stopped on a red light on the Prince Mohammed bin Abdulaziz Street (also known as Tahlia Street), inside one of the wealthiest districts in the heart of the Saudi city.

He went on to perform his dance in a humorous fashion to waiting vehicles. The dance was captured in a 40-second video that went viral over the weekend on social media platforms.

Jeddah police confirmed it identified and arrested the boy over offences including "violating public principles" and "obstructing traffic", according to local media reports. His case will be referred to the Public Prosecutor.

If found guilty, the boy may face harsh punishments under the kingdom's ultra-conservative laws - including imprisonment and flogging.

Social media saw a mixed reaction to the video - with some condemning the boy's actions as "immoral" while others applauded him for his courage, calling him a "hero".

"Dear God, what's wrong with today's youth?" one user said on Twitter.

"I pray to God to guide our youth. This boy's actions are immoral. This is not how we were brought up," another user said.