He was later released but was held in Dubai for five weeks.
According to this article in the Gulf News from 2016, punishment for raising the middle finger can include deportation:
Chief judge Sa’ad says flashing the middle finger in public is an act punishable by the Penal Law that also obligates the presiding judge to hand out a deportation order against the defendant, once incriminated.
“A deportation order is mandatory and inevitable unless the suspect is pronounced innocent,” he told Gulf News.