SOCHI, Russia — His jets patrol Syrian skies . His military is expanding operations at the main naval base in Syria. He is forging closer ties to Turkey. He and his Syrian allies are moving into territory vacated by the United States.

And on Tuesday, President Vladimir V. Putin of Russia played host to President Recep Tayyip Erdogan of Turkey for more than six hours of talks on how they and other regional players will divide control of Syria, devastated by eight years of civil war.

The negotiations cemented Mr. Putin’s strategic advantage: Russian and Turkish troops will take joint control over a vast swath of formerly Kurdish-held territory in northern Syria. The change strengthens the rapid expansion of Russian influence in Syria at the expense of the United States and its Kurdish former allies.

Under terms of the agreement, Syrian Kurdish forces have six days to retreat more than 20 miles from the border, abandoning land that they had controlled uncontested until earlier this month — when their protector, the American military, suddenly began to withdraw from the region. The Syrian Kurdish leadership did not immediately respond to the demand.