Dozens of people witnessed the men, aged 27 and 29, get punished as a team of five enforcers wearing robes and hoods took turns to flog the men.
The men were arrested back in November after residents became suspicious and reported them to Islamic religious police. Police later broke into their rented room where they were caught having sex, said Heru Triwijanarko, Aceh's acting Sharia police chief.
During their punishment, the mother of one man reportedly fainted at the sight of her son being whipped.
Each man was flogged 77 times, three lashes less than their original sentence because they had already served three months in prison, Mail Online reports.
Four others were lashed between 17 and 40 times on the same day, for either drinking alcohol or meeting members of the opposite sex.
One woman was caned 17 times after being found with her boyfriend.
'Islamic sharia enforcement is final, no matter who it is, and even visitors must respect local norms,' public order official Heru Triwijanarko told AFP.
The official said he suspected 'several locations for homosexual practice' in the region which are 'difficult to reveal'. He called on the public to report their suspicions of behaviour which breaks sharia.
See the video below...