WASHINGTON (Reuters) - Prospects for an end to Turkey’s offensive against Kurdish fighters in Syria were better than a week ago, U.S. President Donald Trump’s special envoy for Syria said on Tuesday, but a permanent ceasefire would depend on both sides meeting the terms of last week’s temporary ceasefire agreement.

“We’re in a better place now than we were a week ago,” Special Envoy James Jeffrey told a Senate hearing where both Democrats and Trump’s fellow Republicans lawmakers criticized Trump’s policies.

“In looking at this ceasefire, I think we have done a pretty good job in bringing this conflict to a halt,” Jeffrey said.

He said Turkey’s military had agreed to a more permanent “pause” in the fighting, if Kurdish fighters withdrew from territory as spelled out in last week’s agreement. The five-day ceasefire expired on Tuesday.

U.S. sanctions on Ankara would be eased only if Turkey stopped the offensive, Jeffrey said.

The Republican-led Senate Foreign Relations Committee called Jeffrey to testify two weeks after Trump abruptly announced that he was removing U.S. troops from Syria, clearing the way for Turkey’s offensive against the Kurds and changing the course of the more than eight-year-long Syrian war.

Meanwhile, Syrian and Russian forces will deploy in northeast Syria to remove Kurdish YPG fighters and their weapons from the border with Turkey under a deal agreed to on Tuesday by Turkish President Tayyip Erdogan and Russian President Vladimir Putin.

Committee members from both parties raised concerns that the United States had lost leverage over Ankara, “abandoned” Kurdish fighters who had helped battle Islamic State militants and about the danger of increased instability in a volatile region.

The Kurds ran prisons holding Islamic State fighters. Roughly 10,000 Islamic State detainees were at risk of release if “things go south” in northern Syria, Jeffrey said. He estimated dozens had got out so far.

Several senators mentioned the possibility that NATO ally Turkey would carry out “ethnic cleansing” of the Kurds.

Jeffrey is due to testify to the Democratic-led House of Representatives Foreign Affairs Committee on Wednesday.

“Were the United States to sit back, while Turkey attempted to slaughter the Kurds, I think that would be disgraceful,” Republican Senator Ted Cruz said.

Jeffrey said he was not consulted about Trump’s plan to withdraw troops. He said he was “personally furious” about Turkey’s offensive, but said Turkey remains a democracy that shares many U.S. values and is not an international rival.

The panel’s Republican chairman, Senator Jim Risch, said sanctions must be imposed on Turkey if it continues its offensive.

“If Turkey maintains its aggressive path, it must bear a cost for undermining U.S. security interests,” Risch said.

Republican Senator Marco Rubio said he did not believe Turkey seeks only a “safe zone” in northern Syria. Erdogan wants a permanent territory with very few Kurdish residents where Syrian refugees could be returned from Turkey, Rubio said.