Lawmakers in Ukraine on Thursday approved a bill that bans workplace discrimination based on sexual orientation.

The bill cleared the 450-seat parliament with 234 votes.

Ukrainian President Petro Poroshenko cheered passage, calling it “historic.”

Four previous attempts to approve the measure had failed.

According to the AP, the legislation is part of a plan to win visa-free travel between Ukraine and the European Union.

“Ukrainian authorities have sought to forge closer ties with the EU amid a conflict with Russia, which annexed Ukraine's Crimean Peninsula and supported pro-Russian insurgents in eastern Ukraine,” the AP reported.

In 2012, lawmakers facing international pressure tabled a proposed bill which sought to ban Ukrainians from speaking favorably about gay men and lesbians. Many European officials criticized the proposal, saying it would have a chilling effect on freedom of speech.