Turkey, a NATO member state, has retained friendly relations with Russia since Moscow ordered tens of thousands of troops into Ukraine in February 2022, prompting a breakdown of relations with the U.S.-led military alliance.

The source said Fidan also told Lavrov, "he hoped for a diplomatic solution to the Ukraine war with the participation of all parties, and that Turkey supports all initiatives to preserve regional stability and prosperity".

Earlier, Russian Foreign Ministry spokeswoman Maria Zakharova published on her channel on the Telegram messenger app a picture of Lavrov meeting Fidan in Rio de Janeiro.

Zakharova captioned the photograph: "Russo-Turkish talks in Rio". Lavrov was attending the G20 as part of a wider series of visits in Latin America.

The Kremlin has said that President Vladimir Putin is expected to visit Turkey in March.

The Turkish source said high-level visits planned for the coming period were also discussed by the two ministers.

(Reporting by Tuvan Gumrukcu, writing by Felix Light and Daren Butler; editing by Hugh Lawson and Mark Heinrich)