An elite police unit detained the men early Friday in a raid on a community center at Keraniganj, south of the nation's capital, Dhaka.
"We've arrested 27 people for homosexuality. They are homosexuals. They held a get-together there," an official with the unit told the AFP news agency.
Police said the 27 may not face charges of homosexuality, which is punishable with life in prison, because they were taken into custody before engaging in sexual activity.
Punishment for homosexuals by ISIS: death.
See, they're such moderates.