BERLIN (Reuters) - German Chancellor Angela Merkel said on Sunday she would seek an end to Turkey’s membership talks with the European Union in an apparent shift of her position during a televised debate weeks before a German election.

“The fact is clear that Turkey should not become a member of the EU,” Merkel said in the debate with her Social Democrat (SPD) challenger Martin Schulz.

“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 added.

The comments are likely to worsen already strained ties between the two NATO allies that have deepened since Turkish President Tayyip Erdogan’s crackdown on opponents in the aftermath of a failed coup attempt in July of last year.

There was no immediate reaction from Turkey which is in the midst of a national religious holiday.

Merkel’s comments came after Schulz appeared to surprise her by vowing to push for an end to the negotiations if he was elected chancellor in the Sept. 24 federal election.

“If I become German chancellor, if the people of this country give me a mandate, then I will propose to the European Council that we end the membership talks with Turkey,” Schulz said. “Whether we can win over all the countries for this I don’t know. But I will fight for this.”

Merkel initially cautioned against such a move, saying it would be irresponsible to endanger ties with Turkey at a time when German citizens are imprisoned there.

Twelve German citizens are now in Turkish detention on political charges, four of them holding dual citizenship.

“I do not intend to break off diplomatic relations with Turkey just because we’re in an election campaign and want to show each other who is tougher,” she said.

But after the moderators had moved on and asked the two candidates a question about U.S. President Donald Trump, Merkel returned to the Turkey issue, suddenly throwing her weight behind an end to the membership talks.

Merkel’s conservative party, the Christian Democratic Union (CDU), has long opposed Turkish membership in the European Union.

But the green light for membership talks was given months before Merkel became chancellor in 2005 and she has always said that she will respect that decision, referring to the negotiations as “open ended”.

The accession talks have ground to a virtual halt and EU leaders have stepped up their criticism of Erdogan.