Ukraine has long sought to join NATO, which would afford it much greater protection against Russia and other adversaries.