Turkey's Constitutional Court has ruled that the country's block on accessing Wikipedia is unconstitutional.
The court said the ban violated rights concerning freedom of expression, and ordered it be lifted.
The Turkish government barred the website in 2017 because of entries suggesting Turkey had co-operated with jihadist militants in Syria.
Turkish censors have often temporarily blocked websites carrying content critical of the government.
The Wikimedia Foundation took Turkey to the European Court of Human Rights (ECHR) in May over the ban, arguing that the blocking of the online encyclopaedia violated the right to freedom of expression.
Thursday's ruling is a significant victory for the foundation, writes BBC Europe regional editor Danny Aeberhard.
Wikipedia's founder, Jimmy Wales, celebrated the ruling in a tweet.
What are the wider implications of the ruling?
The Constitutional Court voted by 10-6 that the ban violated freedom of speech.
It is expected that the authorities will lift it accordingly.
Turkey imposed the ban after articles on Wikipedia suggested it had co-operated with the Islamic State group and others, and made allegations of state-sponsored terrorism.
Under President Recep Tayyip Erdogan, the country is a key foreign player in the conflict in neighbouring Syria, hosting 3.7 million refugees and building a controversial "safe zone" along its north-eastern border.
According to the Wikimedia Foundation, the ECHR has given its case against Turkey priority status and is due to receive submissions from the Turkish government next month.
"Today is a good day for those of us that believe in the power of knowledge and dialogue," the foundation said.
"We are encouraged by this outcome and will continue to work towards a world in which knowledge is freely accessible to all."
Turkey figures towards the bottom of a global index for media freedom put together by the organisation Reporters Without Borders, which rates it at 157 out of 180 countries.