BERLIN (Reuters) - Chancellor Angela Merkel appeared to hold her ground in a television debate ahead of German elections, under attack from her Social Democrat (SPD) rival on refugee policy, ties with Turkey and her handling of U.S. President Donald Trump.

Journalists watch a TV debate between German Chancellor Angela Merkel of the Christian Democratic Union (CDU) and her challenger Germany's Social Democratic Party SPD candidate for chancellor Martin Schulz in Berlin, Germany, September 3, 2017. REUTERS/Fabrizio Bensch

Merkel was some 14 points ahead of Martin Schulz in opinion polls before the debate. A survey by Infratest Dimap for ARD television showed her overall performance was viewed as more convincing by 55 percent, compared to 35 percent for Schulz.

Three weeks from voting day, center-left contender Schulz went on the offensive from the outset of the 97-minute debate - his only televised duel with Merkel, who looked rattled at times but showed enough authority to win.

Schulz, 61, outfoxed Merkel on ties with Turkey and bounced her into beefing up her rhetoric by vowing to stop Ankara’s bid to join the European Union if he was elected chancellor.

After initially cautioning against pulling the plug on accession talks right now, Merkel returned to the issue of Turkey even when the moderators had moved on to a question about U.S. President Donald Trump’s policy toward North Korea.

“It is clear that Turkey should not become a member of the EU,” she said after Schulz made his pledge to stop Ankara’s accession bid.

“I’ll speak to my (EU) colleagues to see if we can reach a joint position on this so that we can end these accession talks,” Merkel, 63, added in comments likely to worsen already strained ties with Ankara.

In their exchange on Trump and North Korea, Schulz accused the U.S. president of “bringing the world to the brink of crisis with his tweets” and said Germany should work with its European partners, Canada, Mexico and Trump’s domestic U.S. opponents.

Merkel, seeking a fourth term, responded by deploying her credentials as a global stateswoman, saying she had spoken to French President Emmanuel Macron about North Korea on Sunday and would talk to Trump as well as leaders from Russia, China, Japan and South Korea in the coming days.

Slideshow ( 11 images )

“I don’t think that one can solve this conflict without the American President,” she said. “But I think one must say in the clearest terms that for us, there can only be a peaceful diplomatic solution.”

MERKEL “MORE CREDIBLE”

Her show of experience appeared to work with voters. The ARD poll showed that 49 percent of those surveyed viewed Merkel as being more credible while 29 percent favored Schulz.

Merkel has been chancellor since 2005 and is widely seen as Europe’s most influential politician.

She has weathered storms over mass immigration and financial and political turmoil in the European Union, while the SPD, Germany’s oldest party, has struggled to promote a strong rival.

Schulz’s campaign got off to a promising start early this year, with thousands flocking to the party after he was chosen as candidate; but three crushing defeats at the hands of the conservatives in regional elections, including in its heartland of North Rhine-Westphalia, knocked him off course.

Schulz has called Merkel “aloof” and attacked her on a range of issues but failed to dent her lead.

In the debate, he attacked her for failing to coordinate a better European response to the refugee crisis in 2015, when Merkel’s decision to open Germany’s borders to hundreds of thousands of refugees, many fleeing war in the Middle East, cost her support.

“The inclusion of our European neighbors would have been better,” Schulz said. Merkel shot back: “We had a very dramatic situation then ... There are times in the life of a chancellor when she has to decide.”

Schulz, a former European Parliament president with no national government experience in Germany, looked directly into the camera when making his closing remarks and appealed to voters to show the courage to choose change.

But he refused to rule out a coalition with the far-left Linke. Merkel, ruling out a rise in the retirement age to 70 as some in her party have suggested, said she would not join forces with the Linke or the hard-right Alternative for Germany (AfD).