WASHINGTON—The U.S. and Uzbekistan have reached an agreement to transfer a group of Afghan Air Force pilots and their relatives to a U.S. military base as soon as this weekend, people familiar with the matter said.

The Uzbek government has been under intense pressure by the Taliban in Afghanistan to hand over the pilots, who flew themselves and relatives to safety in Uzbekistan aboard Afghan Air Force helicopters and airplanes.