ANKARA (Reuters) - Turkey’s Constitutional Court ruled on Thursday that a more than two-year block on access to online encyclopedia Wikipedia in the country is a violation of freedom of expression.

The ruling opens the way for lifting the website ban, which has been in place since 2017 due to entries that accused Turkey of having links to terrorist organizations.

On its website, the court said it had ruled “that freedom of expression, which is under the protection of the 26th clause of the Constitution, had been violated.”

Wikimedia Foundation, the nonprofit organization that hosts Wikipedia, had applied to Turkey’s highest court to challenge the access block.

“One of the sad issues is this: We expressed on every platform since the first day that the process of blocking access to the whole of Wikipedia was unlawful,” Gonenc Gurkaynak, a lawyer representing Wikimedia, wrote on Twitter.

“Still, we had to drag out the subject by filing a lawsuit both with the (Constitutional Court) and (the European Court of Human Rights) and fight for this issue for years,” he said.

The ruling was passed by a 10-to-six majority in the court, said Yaman Akdeniz, a lawyer who had applied to the court as a user.

Turkey blocked Wikipedia in April 2017 when the telecommunications watchdog cited a law allowing it to ban access to sites deemed obscene or a threat to national security.

The Constitutional Court needs to send a written statement to Turkey’s telecommunication watchdog for the ban to lifted, Akdeniz told Reuters, adding that in the past similar rulings were implemented within 24 hours.

“Legally the (lower) court does not have the right to resist this ruling,” he said. But he added there have been recent examples in which lower courts did not immediately implement the Constitutional Court ruling.

Akdeniz said the articles that led to the ban would remain online.

The independence of Turkey’s judiciary has been hotly debated in recent years, with critics saying court rulings are influenced by politicians. President Tayyip Erdogan and his ruling AK Party deny such claims, saying the judiciary makes its decisions independently.