A Cairo court on Sunday released 17 people arrested last month during a crackdown by the authorities on homosexuality, judicial sources said.
They had been charged with practicing homosexuality and inciting debauchery and were sentenced to three years in prison should they fail to pay a fine of 5,000 Egyptian pounds ($285).
The defendants have been given leave to appeal against the sentence in a higher court.
Although homosexuality is not specifically outlawed in Egypt it is a conservative society and discrimination is rife. Gay men are frequently arrested and typically charged with debauchery, immorality or blasphemy.
In October Egyptian security forces arrested 57 people in a wave of arrests triggered by the raising of a rainbow flag at a music concert.
The overwhelming majority of those arrested were not involved in the flag incident, however, and were arrested over their perceived sexual orientation in the following days.