FILE PHOTO: U.S. President Donald Trump meets with President Recep Tayyip Erdogan of Turkey during the U.N. General Assembly in New York, U.S., September 21, 2017. REUTERS/Kevin Lamarque

WASHINGTON (Reuters) - Turkish President Tayyip Erdogan and U.S. President Donald Trump may soon have a face-to-face meeting, either in Turkey or on the sidelines of the G20 summit in Japan next month, a senior Turkish official said on Wednesday.

Speaking on the condition of anonymity, the official said Erdogan had invited Trump to Turkey and that there were “positive signals” the American president would accept the invitation.

“We are working on the calendar now,” the official said. “We have some positive signals but the time has not been scheduled yet. They may meet on the margins of G20 in Japan as well,” he said. “For a bilateral visit, we are waiting for an exact date.”

The United States and Turkey have been at loggerheads recently, primarily due to Ankara’s planned purchase of Russian S-400 missile defense systems, which Washington says are incompatible with the NATO defense network and would pose a threat to U.S. F-35 stealth fighter jets which Turkey also plans to buy.

U.S. Secretary of State Mike Pompeo and several prominent U.S. senators have warned Turkey it will face penalties for buying the S-400s, under legislation which calls for sanctions against countries procuring military equipment from Russia. Turkey says as a NATO member it poses no threat to the United States and the sanctions should not apply.

Investors have been keeping an eye out for a potential meeting between the two presidents because Turkey’s hopes of avoiding punishing U.S. sanctions have increasingly appeared dependent on a potential intervention from Trump.

Turkey’s finance minister Berat Albayrak, who is also Erdogan’s son-in-law, in April met with Trump and his son-in-law and White House adviser Jared Kushner on the issue. Few details of the meeting have emerged, but Turkish media quoted Albayrak as saying Trump had a “positive understanding ... regarding Turkey’s needs for the S-400s.”