Turkey had been the only country in the world apart from China to entirely block access to the online encyclopedia

A Turkish court on Wednesday lifted a ban on Wikipedia after almost three years.

Turkey was the only country in the world apart from China to entirely block access to the .

But its constitutional court ruled last month that the ban, in place since April 2017, violated freedom of expression.

Turkish officials said in 2017 that the ban was needed as Wikipedia had failed to remove content accusing its government of assisting .

Rights groups have regularly criticised the erosion of free speech in Turkey under President Recep Tayyip Erdogan, especially since a failed coup attempt in 2016 triggered a massive crackdown on government critics in the press and beyond.

An Ankara judge gave the order on Wednesday for the ban to be lifted by the telecommunications watchdog.

Users said the website was still inaccessible on Wednesday though it was expected to be gradually unblocked nationwide.