Russia has withdrawn thousands of its troops massed on the border with Ukraine, even as violence escalated inside that country between government troops and pro-Russian separatists, Defense Secretary Chuck Hagel said Thursday.

Hagel called the withdrawal “promising” but said that thousands of troops remained of the 40,000 Russia moved to the border in recent months. “They are not where they need to be and won’t be until all of their troops . . . are gone,” he said.

A senior Defense official traveling with Hagel said that about seven Russian battalions remain of those that were deployed to the east and south of Ukraine. The Obama administration has repeatedly demanded the troop withdrawal, saying that any movement across the border would trigger another round of U.S. sanctions against Russia.

NATO said Friday that more than two-thirds of Russia’s troops have now pulled back from the border zone.

“Several thousand troops still remain in the vicinity, but most of these units appear to be preparing to withdraw,” a NATO military officer said via e-mail.

1 of 29 Full Screen Autoplay Close May 31, 2014 Saturday May 29, 2014 Thursday Skip Ad × Ukrainian government vows more military action View Photos The Ukrainian government vowed to push ahead with military operations against pro-Russian separatists in the embattled east of the country after using attack helicopters and fighter jets to retake Donetsk’s airport. Caption The Ukrainian government pledged to push ahead with military operations against pro-Russian separatists in the embattled east of the country after using attack helicopters and fighter jets to retake Donetsk’s airport. Pro-Russian members of the Vostok militia battalion run a training exercise at their base near Donetsk, in eastern Ukraine, where clashes between pro-Russian forces and Ukrainian troops have persisted. Valentina Svistunova/European Pressphoto Agency Buy Photo Wait 1 second to continue.

Some of those units remain capable of carrying out a military operation, the officer said.

A complete withdrawal from the area would be “a step in the right direction from Russia,” the NATO officer said. But it would not “erase or reverse what has happened in recent months.”

Russia’s annexation of Ukraine’s autonomous Crimea region in March and its ongoing support of separatist militants in eastern Ukraine, along with its troop presence along Ukraine’s border, have “fundamentally changed” the security dynamic in the region, the officer said, speaking on the condition of anonymity in accordance with NATO ground rules.

Hagel spoke aboard his military aircraft en route to an Asian defense conference in Singapore, at the start of a 12-day, around-the-world trip, his longest since taking office early last year.

After the gathering with his Asian counterparts and other officials from the region, Hagel will attend a meeting of NATO defense ministers in Brussels next week. The alliance is expected to begin formalizing its plans to leave a residual force in Afghanistan after the withdrawal of combat troops at the end of the year.

President Obama announced this week that a 9,800-strong U.S. force will remain in Afghanistan for one year for training and counterterrorism missions. Germany, Italy and Turkey are each expected to leave about 800 troops behind, along with smaller forces from other NATO and non-NATO forces that are currently part of the international military operation there.

The U.S. force will be cut roughly in half in 2016 and be withdrawn by the end of that year.

NATO ministers also plan to discuss the situation in Ukraine. From Brussels, Hagel will travel to Romania and visit the USS Vella Gulf, the naval cruiser that is patrolling the Black Sea, before joining Obama in Normandy for the 70th anniversary of the D-Day invasion.

Abigail Hauslohner in Moscow contributed to this report.