By Tulay Karadeniz and Ece Toksabay
ANKARA (Reuters) - German Chancellor Angela Merkel stressed the importance of freedom of opinion in talks with Turkish President Tayyip Erdogan on Thursday, during a visit meant to help improve frayed ties between the two NATO allies.
In her first trip to Ankara since a failed military coup in Turkey last July, Merkel, said she had agreed with Erdogan on the need for closer cooperation in the fight against terrorism, including the Kurdistan Workers Party (PKK).
Germany and Turkey have been at odds over Ankara's crackdown on dissidents since the abortive July 15 coup, as well as its allegations - rejected by Berlin - that Germany is harboring Kurdish and far-leftist militants.
"With the (attempted) putsch, we saw how the Turkish people stood up for democracy and for the rules of democracy," Merkel told a news conference, when asked about concern over proposed constitutional changes that would strengthen Erdogan's powers.
"In such a time of profound political upheaval, everything must be done to continue to protect the separation of powers and above all freedom of opinion and the diversity of society," she said, adding she had also raised the issue of press freedom.
"Opposition is part of democracy," Merkel said.
Turkey's allies, including Germany, fear Erdogan is using the coup attempt as a pretext to curtail dissent and Erdogan's opponents fear the planned constitutional changes will lead to an authoritarian state.
The constitutional reform bill was submitted to Erdogan later on Thursday, parliamentary sources said. Once he approves it, the electoral commission will set a date for a referendum, expected in April.
"It is out of the question for the separation of powers to be abolished," Erdogan said of the proposals, which would replace Turkey's parliamentary system with an executive presidency.
"It gives more opportunity for the executive branch to work more swiftly. The judiciary will retain its power and function as usual with the new system."
Erdogan also said Turkey may provide evidence to the German authorities after around 40 mostly high-ranking Turkish soldiers who worked at NATO facilities in Germany were reported to have requested asylum.
Turkish Deputy Prime Minister Veysi Kaynak said on Wednesday that Berlin was sheltering members of what Ankara calls the "Gulenist Terrorist Organisation" (FETO), the network of U.S.-based Muslim cleric Fethullah Gulen, which Turkey blames for the coup bid. Gulen denies involvement.
"If the Gulenists involved in the coup are fleeing to Germany, the Justice Ministry may send information and documents," Erdogan said, adding that the United States should take quicker action on an extradition request for Gulen.
Turkey's defense minister has urged Berlin to reject the asylum applications and warned that a failure to do so could damage relations. Berlin has said the applications will be considered on a case-by-case basis.
More than 100,000 people have been sacked or suspended from the police, military, civil service and private sector on suspicion of supporting Gulen since the attempted coup. Some 40,000 people have been jailed pending trial.
Merkel, who later met Prime Minister Binali Yildirim, said the two countries could do more together to fight the PKK, considered a terrorist organization by Turkey, the European Union and the United States. Turkey wants European countries to do more to root out PKK members there.
"We talked in particular about how the PKK and everything associated with it in Germany is being observed and how we're also taking action against it because as I said, the PKK is, as a terrorist organization, banned in Germany too," Merkel said.
"Our intelligence services and interior ministries need to work together more closely."
In January Germany's chief prosecutor launched an investigation into possible spying by Turkish clerics and Merkel said during her visit to Ankara that "irritation or the feeling that people are being observed or spied on needs to be eliminated from the outset".
Interior Minister Thomas de Maiziere said in an interview with Passauer Neue Presse newspaper that domestic Turkish conflicts should not be played out in Germany and that the country would not tolerate violence, spying or surveillance.
(Additional reporting by Paul Carrel, Michael Nienaber and Michelle Martin in Berlin and Ercan Gurses in Ankara; Writing by Nick Tattersall; Editing by David Dolan and Robin Pomeroy)