Mattis flew in for the one-day visit after stopping in Iraq to review progress in the campaign against IS militantse.
Mattis flew in for the one-day visit after stopping in Iraq to review progress in the campaign against IS militants, where he urged coalition partners to prevent other political issues from disrupting the growing momentum against the jihadists.
In Ankara, he will hold talks with President Recep Tayyip Erdogan and Defence Minister Nurettin Canikli.
Turkey, an important NATO ally of the United States and part of the coalition against IS, is incensed that Washington has been arming the Kurdish Peoples' Protection Units (YPG) militias in the assault on the jihadists' stronghold Raqa, in northern Syria.
Turkey regards the YPG as the Syrian affiliate of the outlawed Kurdistan Workers' Party (PKK).
In May, the Pentagon said it had begun transferring small arms and vehicles to the YPG to support their role as part of the Syrian Democratic Forces, a Kurdish-Syrian Arab alliance fighting IS.
The weapons include AK-47s and small-calibre machine guns.
The SDF is currently leading the assault on Raqa, with artillery and air support from US-led coalition forces.
US officials on Tuesday said the grinding fight was the "priority" in the counter-IS campaign since the fall of Mosul last month, the jihadists' Iraqi hub.
The Kurdish regional government in northern Iraq -- which is also playing a key role in the fight against IS -- is planning its own independence referendum in September.
Mattis met Tuesday with Iraqi Kurdish leader Massud Barzani in Erbil to express US opposition to the referendum.
On the same day, Erdogan vowed Turkey would thwart any attempt by the YPG and its political wing the Democratic Union Party (PYD) to carve out a Kurdish state in northern Syria.
"We do not and will never allow a so-called state to be established by the PYD, YPG in northern Syria," Erdogan said.
The US is also concerned about warming ties between Iran and Turkey. Iranian armed forces chief General Mohammad Hossein Bagheri visited Turkey last week.
Erdogan on Monday said a joint operation with Iran against Kurdish militants which "pose a threat," including the PKK, is "always on the agenda." Iran's Revolutionary Guards, however, denied the claim.