* Legal framework gives boost to peace process
* Move may bolster Kurdish support for Erdogan
* Part of efforts to end three-decade insurgency (Adds quotes, background)
By Gulsen Solaker
ANKARA, July 10 (Reuters) - Turkey's parliament approved a legal framework on Thursday for peace talks with Kurdish militants, in an important step towards ending a three-decade insurgency a month before a presidential election.
The bill could be a vote-winner for Prime Minister Tayyip Erdogan, who is hoping to pick up Kurdish support as he bids to become Turkey's first directly elected president in a nationwide poll on Aug. 10.
Turkey, a NATO member state, began peace talks with jailed Kurdish militant leader Abdullah Ocalan in 2012, in an effort to end a 30-year-old insurgency that has killed 40,000 people.
Until now however there have been few legal provisions for negotiating with Ocalan's banned Kurdistan Workers' Party (PKK) - labeled a terrorist organisation by the Turkish authorities, the European Union and the United States.
"Turkey is normalising and democratising," Agriculture Minister Mehdi Eker, a ruling party deputy from the mainly Kurdish city of Diyarbakir, said after the law was passed.
"This bill will strengthen Turkish citizens' sense of belonging and will be a vehicle for unity and integrity," he told parliament.
The new law will shield from prosecution those involved in disarming and reintegrating Kurdish rebels, as well as giving legal protection to meetings aimed at ending the bloodshed.
Pro-Kurdish politicians have long sought such a bill, partly to remove the risk of those involved in the talks being prosecuted if the political climate in Turkey turns against the peace process in future.
An earlier draft offering even wider immunity to government officials was toned down after complaints from opposition MPs that it was unconstitutional.
The PKK took up arms in 1984 with the aim of carving out a separate state in the southeast for Turkey's Kurds. They subsequently moderated their demands, seeking increased political and cultural rights which were long denied.
A ceasefire called by Ocalan in March 2013 has largely held, despite rising tensions this year over the construction of military outposts in Kurdish areas by the Turkish army.
The cross-party support the bill finally garnered - passing with a majority of more than 80 percent - marked an important step in the peace process, according to Hasip Kaplan, an MP for the pro-Kurdish People's Democratic Party.
"The government and the prime minister mainly made these decisions (on the peace process) before, other parties didn't contribute. With the main opposition's support, we have overcome an important threshold," he said.
Erdogan has invested significant political capital in peace efforts, boosting cultural and language rights for Kurds at the risk of alienating some of his own grassroots support.
Kurds account for around a fifth of Turkey's population and could boost Erdogan's presidential chances if he can count on their support, particularly in the event of a second-round run-off, although opinions polls already give him a strong lead.
"We started the peace process long before the elections," said Mehmet Metiner, a member of Erdogan's ruling AK Party, denying any link between the timing of the bill and the presidential poll.
"We have no doubt that we will win the election." (Writing by Jonny Hogg; Editing by Nick Tattersall and Hugh Lawson)
Our Standards: The Thomson Reuters Trust Principles.