An official says Ukraine’s troops are “almost fully in control” after Russia completed its retreat.