DOHUK, Iraq — United States troops have crossed into Iraq from Syria as the U.S. begins to withdraw most of its troops from the region.

NBC News journalists saw a convoy of U.S. military vehicles with American flags on the outskirts of Dohuk, a city in Iraqi Kurdistan some 45 miles from the border with Syria.

Video circulating on social media appeared to show people throwing hand-held projectiles at U.S. troops as they moved through towns in northeastern Syria. NBC News could not independently verify the videos.

A convoy of U.S. vehicles at the Iraqi-Syrian border crossing in the outskirts of Dohuk, Iraq, on Monday. Ari Jalal / Reuters

Much of the Kurdish-majority population in northeastern Syria feel betrayed by the U.S.’s withdrawal, which has left them more vulnerable to the Turkish assault. The Kurdish-led Syrian Democratic Forces have been crucial U.S. allies in the fight against the Islamic State group and some are still working with the U.S. to defend oilfields from militants in the northeast.

U.S. Defense Secretary Mark Esper said on Saturday that all of the nearly 1,000 troops withdrawing from northern Syria are expected to move to western Iraq to continue the campaign against Islamic State group militants and "to help defend Iraq."

A garrison of about 300 personnel at the U.S. base at Al Tanf in the south wouldn't be affected by the order, administration officials said earlier this month. President Donald Trump's decision to withdraw U.S. troops from Syria has been widely criticized by Republicans and Democrats alike.

And speaking to reporters in Afghanistan on Monday, Esper stressed that the withdrawal would take weeks, not days and that troops around the town of Kobani were moving first.

Some troops in towns near oilfields had not started to withdraw in order to prevent oil from falling into ISIS's hands.

“The purpose is to deny access, specifically revenue, to ISIS and any other groups that might want to seek that revenue to enable their own malign activities,” Esper told reporters.

Esper also said the Pentagon was discussing keeping some U.S. troops in parts of northeastern Syria but that he had not yet presented that option to the president.

"There has been a discussion about possibly doing it, there's been no decision with regards to numbers or anything like that," he said.

On Thursday, Turkey agreed in talks with Vice President Mike Pence to a five-day pause in an offensive into northeastern Syria to allow time for the Kurdish fighters to withdraw from a "safe zone" Ankara aims to establish near its border with Syria.

The pause in fighting is due to elapse Tuesday, when Turkish President Recep Tayyip Erdogan is also set to visit Sochi to meet with Russian President Vladimir Putin.

Matt Bradley and Yuka Tachibana reported from Dohuk, Iraq; Saphora Smith reported from London.