The U.N.'s human rights office has urged Ukraine to rethink a much-criticized bill that envisions jail time for people who disseminate positive information about gays.

A spokesman for the U.N. human rights commissioner, Rupert Colville, said Friday that the law "is clearly discriminatory and runs counter to Ukraine's international commitments to ensure freedom of expression and information."

The law has caused outrage among rights groups and politicians who have called it a flashback to Soviet times, when homosexuality was a crime.

The bill envisages prison terms of up to five years for spreading homosexual "propaganda" — positive public depiction of gays.

Despite the criticism, legislators on Tuesday passed the bill in the first of two required readings. President Viktor Yanukovych has not said whether he will sign it into law.