Ukrainian lawmakers have approved a bill that bans discrimination against gay people at work – key legislation intended to help pave the way for visa-free travel between the country and the European Union.

The 450-seat parliament on Thursday approved the bill with 234 votes. The Ukrainian president, Petro Poroshenko, hailed parliament’s action as a “historic” move that brought the nation close to its longtime goal of winning the visa-free regime.

Ukrainian authorities have sought to forge closer ties with the EU amid a conflict with Russia, which annexed Ukraine’s Crimean Peninsula and has supported pro-Russia insurgents in eastern Ukraine.

The bill banning discrimination against gay people in the workplace had been rejected on four previous attempts, reflecting a strong opposition from those in parliament who saw the document as a challenge to the country’s Orthodox Christian traditions.