A Saudi Arabian man has been arrested after he raised the rainbow LGBT pride flag outside his home in Jeddah.

The unnamed doctor was arrested by Saudi religious police within hours of flying the flag on a pole in the port city.

However, he was released shortly afterwards, after claiming he had no idea the rainbow flat represented LGBT pride.

Half-mast: The unnamed doctor was arrested by Saudi religious police within hours of flying the rainbow LGBT pride flag outside his home in Jeddah

The man told Saudi religious police, known as the Committee for the Promotion of Virtue and the Prevention of Vice, that he had bought the flag online.

He explained to the Committee that his children had 'found the colors pretty', so he bought it for them, Albawaba.com reports.

After promising to remove the flag with immediate effect, he was bailed pending an investigation.

No pride: The Saudi man was released on bail after telling religious police that he had bought the flag online because his children liked the colours, and claimed he had no idea what it represented

Homosexuality remains illegal under Saudi Arabia's harsh interpretation of Sharia Law, and punishable by death.

Although the maximum punishment for homosexuality is execution, the Saudi government tends to use other punishments such as fines, prison sentences, chemical castration and whipping.

A second conviction for homosexuality automatically merits execution.