ANKARA (Reuters) - Turkey's parliament passed a reform of its anti-terrorism laws in a vote late on Thursday, narrowing the definition of terrorist propaganda in line with EU demands that it boost freedom of expression.

The reforms coincide with progress in efforts by the government and Kurdish militants to negotiate an end to a 28-year insurgency, but the justice minister rejected the idea that the new laws would facilitate the release of prisoners linked to the rebels.

Turkey has used the legislation widely to prosecute thousands of politicians, activists and journalists, frequently for things they have said or written.

The country regularly tops the list of countries violating the European Convention of Human Rights and the European Commission had called on Ankara to amend its laws to distinguish between incitement to violence and expression of non-violent ideas.

According to the new law only direct incitement to violence will constitute a crime, and justice ministry officials said it was in line with European Court of Human Rights criteria.

Turkey is holding thousands of defendants accused of links to the Kurdistan Workers Party (PKK) - deemed a terrorist group by both the EU and United States.

Justice Minister Sadullah Ergin said those defendants were being tried with membership of a terrorist organization, rather than spreading propaganda.

Ankara has held several months of peace talks with jailed PKK leader Abdullah Ocalan on ending a conflict in which more than 40,000 people have been killed and his rebels last month declared a ceasefire in line with his demands.

The two sides are currently involved in working out a planned withdrawal of around 2,000 PKK fighters in Turkey to their bases in northern Iraq.

The peace plan envisages eventual disarmament in return for reforms boosting the rights of a Kurdish minority numbering around 15 million, or 20 percent of Turkey's population.

(Writing by Daren Butler; editing by Patrick Graham)