Two men caught having sex withunderage girls were whipped 100 times each in Muslim-majority Indonesia's conservative Aceh province on Wednesday, as one begged officials to stop the painful punishment.Flogging is common for a range of offences in the region at the tip of Sumatra island, including gambling, drinking alcohol, and having gay sex or relations outside of marriage.It is the only province in Indonesia that imposes Islamic law.The two men whipped on Wednesday were arrested this year -- one for having sex with his underage step-daughter and the other for engaging in relations with a neighbour who was also below the age of consent.Indonesia's age of consent is 18, although 16-year-olds can marry with parental permission.The 100-stroke punishment is reserved for the most severe crimes and the pair were also sentenced to as much as five years in prison.By contrast, a half dozen men whipped this week for online gambling -- an offence under Islamic law -- received between seven and 11 strokes each from a rattan cane.On Wednesday, one of the men raised his hand and begged a masked sharia officer to stop after he had received just five lashes, saying he could not take the pain.The flogging resumed after doctors on the scene declared him fit enough to receive some 95 more strokes."We'll only postpone a caning if the doctors say there's a serious health threat," local prosecutor Isnawati, who goes by one name, told reporters Wednesday.The other man quietly endured his punishment as blood seeped through the back of his shirt.Unlike some public floggings that can attract hundreds of spectators, including children, only a few dozen people watched Wednesday's whipping, which took place in a sports stadium.Usually public whippings are held outside a mosque after Friday prayers.Rights groups slam public caning as cruel, and Indonesia's President Joko Widodo has called for it to end.But the practice has wide support among Aceh's mostly Muslim population -- around 98 per cent of its five million residents practise Islam.Earlier this year, Aceh said that flogging would be carried out behind prison walls in future, but some local governments have continued public whippings.