US president Donald Trump: ‘Sometimes it’s time to come back home, and we’re thinking about that very seriously.’ Photograph: Carlos Barria/Reuters

US president Donald Trump said he wanted to “get out” of Syria during a press conference with leaders from Baltic states. Video: The White House

The White House on Wednesday said the US fight against Islamic State in Syria is “coming to a rapid end” as Donald Trump reportedly agreed to keep troops in the war-torn country for the foreseeable future.

Mr Trump has repeatedly expressed a desire to withdraw US troops from Syria “very soon”, despite delaring in January that it was “vital for the United States to remain engaged in Syria”.

In a statement on Wednesday, White House press secretary Sarah Sanders said the military mission to “eradicate” Islamic State, also known as Isis, in Syria was coming to a “rapid end”.

“The United States and our partners remain committed to eliminating the small Isis presence in Syria that our forces have not already eradicated. We will continue to consult with our allies and friends regarding future plans. We expect countries in the region and beyond, plus the United Nations, to work toward peace and ensure that Isis never re-emerges,” she said.

Other outlets said Mr Trump agreed to keep US troops in Syria for an “undetermined period of time” to ensure Islamic State militants were defeated. Mr Trump apparently repeated his demand that other countries in the region step up to restore stability to the country.

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

The White House statement appeared to be an attempt to cut through the confusion, but it offered no timetable for withdrawal.

‘A horrible thing’ On Tuesday, at a press conference with the leaders of three Baltic nations, Mr Trump repeated his view that the US must “get out” of Syria “very soon”. The US has roughly 2,000 forces on the ground in Syria fighting the Islamic State terror group.

Mr Trump claimed that the fight against Islamic State was “almost completed” and said: “I want to get out. I want to bring our troops back home. I want to start rebuilding our nation.”

He said the US had spent $7 trillion on the Middle East over the past 17 years, since the US invasion of Afghanistan and Iraq after the September 11th, 2001, attacks on the World Trade Centre and the Pentagon.

“We get nothing, nothing out of it,” Mr Trump said. “Think of it – $7 trillion over a 17-year period. We have nothing – nothing except death and destruction. It’s a horrible thing. So it’s time.”