The Turkish Constitutional Court ruled Thursday that blocking access to online encyclopedia Wikipedia within Turkey is a violation of freedom of expression, a lawyer representing the organization and various media reports said.

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

State-owned Anadolu news agency said the ruling was passed by a 10-to-six majority in the court in response to an application challenging the block by the Wikimedia Foundation, the nonprofit organization that hosts Wikipedia.

"The Constitutional Court ruled in our Wikipedia case that there was a rights violation," Gonenc Gurkaynak, a lawyer representing Wikimedia, wrote on Twitter.

A court representative declined to give an immediate comment on the ruling.

The website was blocked 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.