CIA director Mike Pompeo will visit Turkey on Thursday in his first overseas visit to discuss security issues, including Ankara's fight against a movement led by a US-based cleric accused of orchestrating the failed military coup.
The visit was decided during a 45-minute telephone conversation between President Donald Trump and Turkish president Recep Tayyip Erdogan late on Tuesday.
Mr Pompeo will also discuss the issue of Syrian Kurdish fighters - backed by the United States - which Ankara considers to be terrorists because of their affiliation with outlawed Kurdish rebels in Turkey, according to officials.
Turkey wants the cleric, Fethullah Gulen, extradited from the United States.
It is also urging Washington to stop backing the Syrian Kurdish groups.
Ties between Nato allies Ankara and Washington were troubled under the Obama administration, with Turkey expressing frustrations over what it perceives as US reluctance to extradite Mr Gulen and the support provided to the Syrian Kurdish fighters.
Ankara has pinned hopes for improved ties on Mr Trump's presidency and the call was being closely watched in Turkey.
Turkish officials said the telephone conversation was "positive and conducted in a sincere atmosphere" and both leaders stressed their strong alliance and need for close cooperation.
Mr Trump and Mr Erdogan also discussed a long-standing Turkish call for the creation of safe zones in Syria, the refugee crisis and the fight against terror groups.
Mr Trump reportedly told Mr Erdogan Washington wished to develop ties with Turkey and to engage in close cooperation with the country on regional issues.
Mr Erdogan for his part requested that Washington "stand with Turkey" in its struggle against the Gulen movement and not to extend support to Syrian Kurdish fighters.
According to the officials, Mr Trump and Mr Erdogan agreed to "move together" in operations to capture Islamic State group-held strongholds of al-Bab and Raqqa in northern Syria.