In prisons across Turkey on Sunday, thousands of inmates ended a mass hunger strike, heeding a calling by militant Kurdish leader Abdullah Ocalan whose conditions they were protesting.

Since the first hunger strike was launched last November by a detained lawmaker from the pro-Kurdish Peoples’ Democratic Party (HDP) over Ocalan’s isolation in prison, the action had grown to involve 3,000 people held in different prisons.

But after the militant leader was allowed to see legal representatives for the first time in eight years this month, Ocalan told his lawyers the hunger strikes “had achieved their goal” and called for them to end.

“After the call… we are ending our hunger strikes,” the prisoners’ representative, Deniz Kaya, said in a statement, quoted by Kurdish news agency ANF.

Ocalan, the co-founder of the outlawed Kurdistan Workers’ Party (PKK), has been held on Imrali Island off Istanbul since 1999.

The first visit by his lawyers took place on May 2. After Turkish authorities lifted an official ban on lawyers’ visits to Ocalan, a second trip by two of his lawyers was made on May 22.

The hunger strike was initially launched by MP Leyla Guven while she was in custody, although she was later released.

Other detainees then followed suit. Eight people also killed themselves over the issue, according to the HDP.

Guven, announcing the end of her hunger strike, said in a statement that although the action was successful, “our struggle against isolation and our struggle for social peace will continue in all areas.”

Guven later told reporters in Diyarbakir in the Kurdish-majority southeast, “With this resistance, Turkey’s peoples, Turkey’s democracy has won,”

Three other HDP MPs said they would also end their hunger strike.

Ocalan’s PKK, blacklisted by Ankara and its Western allies as a terror group, has been waging an insurgency against the Turkish state since 1984 during which more than 40,000 people have been killed.

Ocalan was arrested in February 1999 in Kenya and jailed several months later after he was found guilty of treason, separatism and murder.

Despite almost complete isolation, Ocalan is still a key figure of the Kurdish insurgency and the movement generally in the region.

– with reporting by AFP