UPDATE 1-Shelling heard around Syrian town after Turkish-U.S. ceasefire deal
* Gunfire, smoke in Syrian border town of Ras al Ain
* Deal would allow Kurdish forces to leave 'safe zone'
* Unclear if Kurdish forces will fully comply
* U.S troop withdrawal presaged Turkey's assault
* Critics accuse Trump of abandoning Kurdish allies (Adds context, background)
CEYLANPINAR, Turkey, Oct 18 (Reuters) - Shelling and gunfire resounded around the northeast Syrian town of Ras al Ain on Friday, a day after Turkey agreed with the United States to pause its offensive in Syria for five days to let Kurdish forces withdraw.
Machine-gun fire and shelling could be heard from the Turkish town of Ceylanpinar across the border from Ras al Ain, and smoke rose from one part of the Syrian town.
The truce was announced some 13 hours earlier by U.S. Vice President Mike Pence after talks in Ankara with Turkish President Tayyip Erdogan. Turkey agreed to the five-day pause to let the Kurdish-led SDF militia withdraw from a "safe zone" Ankara had sought to capture.
The deal was praised by U.S. President Donald Trump, who said it would save "millions of lives," while Turkey cast it as a complete victory.
If implemented, the deal would achieve all the main objectives Turkey announced when it launched its assault on Oct. 9: control of a strip of Syria more than 30 km (20 miles) deep, with the SDF forces - once U.S. allies in the years long fight against Islamic State - obliged to pull out.
Republican and Democratic senators accused Trump of having betrayed the Kurdish allies who were vital in fighting Islamic State militants, of brushing aside the humanitarian costs of Turkey's invasion and of being outwitted by Ankara.
It was unclear what if any damage came from the shelling heard on Friday.
It was also unclear whether the Kurdish-led Syrian Democratic Forces (SDF) would fully comply with the agreement, which would leave Turkish forces in charge of a swathe of territory that the Kurds once held with U.S. military support.
SDF commander Mazloum Kobani told Kurdish broadcaster Ronahi TV late on Thursday the group would accept the ceasefire agreement but said it was limited to the border areas running between Ras al Ain and the town of Tal Abyad.
The joint U.S.-Turkish statement released after the talks in Ankara said: "The safe zone will be primarily enforced by the Turkish Armed Forces."
It said Washington and Ankara would cooperate on handling Islamic State fighters and family members held in prisons and camps, a major international concern. Pence said U.S. sanctions imposed on Tuesday would be lifted once the ceasefire became permanent.
In Washington, U.S. senators who have criticized the Trump administration for failing to prevent the Turkish assault in the first place said on Thursday they would press ahead with legislation to impose sanctions against Turkey despite the ceasefire announcement.
A Turkish official told Reuters that Ankara got "exactly what we wanted" from the talks with the United States.
Turkish Foreign Minister Mevlut Cavusoglu described the deal as a pause, solely to allow the Kurdish fighters to withdraw. They would be forced to give up their heavy weapons and their positions would be destroyed, he said.
He declined to call the agreement a "ceasefire," saying ceasefires could be agreed only by legitimate sides, and not by a Kurdish militia that Turkey considers a terrorist group.
"When the terrorist elements completely leave the safe zone, we can stop the operation," Cavusoglu said on Thursday.
The Turkish assault began after Trump moved U.S. troops out following an Oct. 6 phone call with Erdogan.
It has created a new humanitarian crisis in Syria with - according to Red Cross estimates - 200,000 civilians taking flight, a security alert over thousands of Islamic State fighters potentially abandoned in Kurdish jails, and a political maelstrom at home for Trump.
The House of Representatives condemned his policy in a vote backed by a majority of his fellow Republicans as well as Democrats. Trump announced sanctions on Turkey on Tuesday, after the assault began, but critics said these were too little, too late.
If successful, the ceasefire deal could smooth over a major rift between the United States and Turkey, the only Muslim NATO ally.
But the U.S. withdrawal also leaves U.S. adversaries Russia and Iran in a far stronger position in Syria. The Kurds responded to the U.S. withdrawal by effectively switching allegiances and inviting Syrian government forces, backed by Moscow and Tehran, into towns and cities in areas they control.
There could be friction both along the edges of the new safe zone claimed by Turkey, and within it, where Syrian government forces have advanced in recent days.
While Pence said Washington had already been in contact with the SDF and that it was already pulling out, the Kurdish position was not clear.
Kobani, the SDF commander, said the agreement was "just the beginning" and would not achieve Turkey's goals. Aldar Xelil, a leading Syrian Kurdish politician, said the Kurds would abide by the ceasefire but would defend themselves.
There was more uncertainty around the flashpoint Syrian border town of Kobani. Pence said the deal provided for Turkey not to engage in military operations there, while Cavusoglu said Turkey had given no commitments about Kobani.
U.S. Special Representative for Syria Engagement, James Jeffrey, said late on Thursday the agreement covered central northeastern Syria, adding Turkey was in separate talks with the Russians and the Syrians about other parts of the region.
"We have a very (convoluted) situation with Russian, Syrian Army, Turkish, American, SDF and some Daesh (Islamic State) elements all floating around in a very wild way," he said.
(Additional reporting by Daren Butler and Ali Kucukgocmen in Istanbul; Writing by Jonathan Spicer; editing by John Stonestreet)
© Copyright Reuters Ltd. All rights reserved. The information contained in this news report may not be published, broadcast or otherwise distributed without the prior written authority of Reuters Ltd.