Ukraine's parliament has approved in the first reading a bill that would make it illegal to openly support homosexuality.

The draft, approved by lawmakers on October 2, would make what it calls "promotion of homosexuality" -- defined as taking action to create a positive portrayal of gays -- a crime.

Supporters of the bill argue in a note accompanying the draft that "the spread of homosexuality constitutes a threat to national security" because the lifestyle choice could lead to an HIV/AIDS "epidemic," destroy the institution of family, and lead to a shortage of children which could trigger a "demographic crisis."

The bill calls for punishment of up to five years in jail.

Parliament must approve the bill in a second reading before it can be sent to President Viktor Yanukovych for signature into law. Reports say it is unclear if Yanukovych intends to sign it.

Local and Western human rights groups have denounced the legislation as discriminatory and an echo of Soviet times, when homosexuality was a criminal offense.

The bill has been put forward in advance of Ukraine’s October 28 parliamentary elections.

The measure follows similar legislation that was passed and took effect this year in Russia’s second city of St. Petersburg and has been proposed in Russia’s State Duma lower house of parliament.

Opponents of the measure staged a protest outside the Ukrainian parliament in Kyiv on October 2. Yelena Shevchenko, a member of the Insight activist organization, condemned the legislation as an attack on freedom of speech and a further restriction on Ukrainian media.

"[The bill] concerns public actions, we will not be able to come out with posters like today, with our symbols, and, for example, to say publicly that you are a homosexual or a lesbian in an interview to a journalist will be considered propaganda," Shevchenko said.

The U.S.-based Human Rights Watch group has warned that moves to restrict the publication and dissemination of materials related to sexual orientation could limit access by Ukrainians to information about gay health issues, support groups, and social networks.

Supporters of the bill also staged a rally near parliament on October 2.

"No one intrudes into one's bedroom, no one interferes with one's private life, this is their own problem," supporter Ruslan Kukharchuk told the Reuters news agency. "But when this person comes out on the street and demonstrates this way of life -- this represents a violation of my rights, a violation of children's rights, a violation of rights of the absolute majority of people, and this worries us, and we demand that propaganda of homosexuality is banned and punished for in Ukraine."

The bill’s author’s have reportedly cited the Oscar-winning Hollywood film “Brokeback Mountain,” which features gay love between two male cowboys, as an example of what could be considered homosexual propaganda under the measure.

Analysts say that if the measure is approved, it is also likely to further complicate Ukraine’s already strained relations with the European Union.

The EU earlier this year suspended ratification of an Association Agreement with Kyiv because of the imprisonment of former Prime Minister Yulia Tymoshenko, who is seen by the EU as a victim of political persecution.