(Adds quotes, background, details)
ANKARA, May 6 (Reuters) - Turkey and Germany agree that all foreign mercenaries in Libya need to leave the country, but Ankara has a bilateral agreement with the Libyan government for its troops to be stationed there, Foreign Minister Mevlut Cavusoglu said on Thursday.
On Wednesday, German Chancellor Angela Merkel told Turkish President Tayyip Erdogan that the withdrawal of foreign troops from Libya would be an "important signal" as both leaders vowed to support the new interim government, a German government spokesman said.
Turkey deployed troops to Libya under an accord on military cooperation signed with the Tripoli-based Government of National Accord (GNA), helping it repel an assault by forces from eastern Libya. It also sent thousands of Syrian fighters to Libya.
"There are many foreign fighters and mercenaries present in Libya. We agree that they need to withdraw," Cavusoglu said in Berlin alongside his German counterpart Heiko Maas.
But "intervention" by third parties into bilateral accords covering military training and support would be wrong. "I think that foreign mercenaries and legitimate presence there should not be confused," he said, without specifying whether Syrian fighters would be pulled back.
In February, President Tayyip Erdogan said Turkey would consider withdrawing its forces in Libya if other foreign troops left first. Ankara has complained about the presence of Russian Wagner mercenaries in support of the eastern forces, which were also backed by the United Arab Emirates, Egypt and France.
(Reporting by Tuvan Gumrukcu; Editing by Dominic Evans)
Our Standards: The Thomson Reuters Trust Principles.