Turkey formally commuted Kurdish guerrilla leader Abdullah Ocalan's death sentence to life in prison Thursday after parliament abolished capital punishment two months ago in a bid to join the European Union. 

An Ankara court ruled that Ocalan, head of the Kurdistan Workers' Party, or PKK, was covered by the August reforms, the semi-official Anatolia news agency reported. 

Turkey has not executed anyone since 1984 but passed the reforms as a necessary step toward EU membership. 

Ocalan, the sole inmate on an island prison in Istanbul, was sentenced to death for treason in 1999 for leading the PKK's 15-year war for autonomy in the mostly Kurdish southeast Turkey. 

The PKK declared a cease-fire in 1999, shortly after Ocalan's arrest in Kenya. The government rejected the move, saying it would only be acceptable if rebels surrendered, which they would not. 

Sporadic clashes continue. Some 37,000 people — mainly Kurdish rebels and civilians — have died as a result of the fighting, which began in 1984. 

Besides abolishing the death penalty, Turkey's parliament in August also granted greater rights to the nation's estimated 12 million Kurds, including the right to broadcast and teach their language. 

The Nationalists, the largest party in parliament, opposed the reforms and have asked Turkey's top court to annul them. 

The European Union, which Turkey hopes to join, has praised the reforms, but has cautioned they must be implemented before Turkey can join.