WASHINGTON (Reuters) - President Donald Trump agreed in a National Security Council meeting this week to keep U.S. troops in Syria a little longer to defeat Islamic State but wants them out relatively soon, a senior administration official said on Wednesday.

Trump did not approve a specific withdrawal timetable at Tuesday’s meeting, the official said. He wants to ensure Islamic State militants are defeated but wants other countries in the region and the United Nations to step up and help provide stability in Syria, the official said.

“We’re not going to immediately withdraw but neither is the president willing to back a long-term commitment,” the official said.

Trump had signaled his desire to get U.S. forces out of Syria in a speech last Thursday in Ohio, and officials said he had privately been pressing for an early withdrawal in talks with his national security aides.

Trump told a news conference on Tuesday with Baltic leaders that the United States was very successful against Islamic State but that “sometimes it’s time to come back home.”

His advisers have been urging him to maintain at least a small force in Syria to ensure the militants are defeated and to prevent Syrian President Bashar al-Assad’s ally Iran from gaining an important foothold.

The United States is conducting air strikes in Syria and has deployed about 2,000 troops on the ground, including special operations forces whose advice has helped Kurdish militia and other U.S.-backed fighters capture territory from Islamic State, also known as ISIS.

White House spokeswoman Sarah Sanders rejected concerns that a U.S. withdrawal from Syria might encourage deeper Iranian involvement in the country, saying U.S. allies and partners in the region could help with security.

“The purpose would be to ... train local enforcement as well as have our allies and partners in the region who have a lot more at risk to put more skin into the game,” Sanders told a briefing. “Certainly that’s something that the president wants to see happen, for them to step up and for them to do more.”

Sanders did not say which regional partners might play a role in Syria, but Trump has said Saudi Arabia should pay more if it wants the United States to remain.

The White House said in a statement on Wednesday that the United States remained committed to eliminating ISIS in Syria, but it added that the U.S. military mission was “coming to a rapid end, with ISIS being almost completely destroyed.”

U.S. Army General Joseph Votel, who oversees U.S. troops in the Middle East as the head of Central Command, estimated on Tuesday that more than 90 percent of the group’s territory in Syria had been taken back since 2014.

In the National Security Council meeting, Trump made clear that he did not want to stay in Syria for a lengthy period. The senior official said the impression Trump left was that he would like to withdraw in a year or less.

“He’s not going to tolerate several years to a half decade,” the official said.

Brett McGurk, the U.S. special envoy for the global coalition against Islamic State, on Tuesday said: “We are in Syria to fight ISIS. That is our mission and our mission isn’t over and we are going to complete that mission.”