WASHINGTON — Russia’s decision to cancel a longstanding high school exchange program with the United States has had one result that the Kremlin may not have anticipated: more slots open for students from Ukraine.

The exchange program, which was established after the end of the Cold War, provides scholarships for students from the former Soviet Union to live with an American family and study at an American high school.

Nearly 240 Russian students are in the program. But last week, Russia abruptly announced that it was withdrawing after one of its students sought asylum in the United States on the grounds that he would face persecution at home because he is gay.

American officials said Tuesday that half of the slots that would have gone to Russian students during the next academic year would instead be allocated to Ukrainians. Ukraine currently has 204 exchange students in the program, and the decision will expand that number to more than 300. The remainder of the Russian slots will go to Georgia, Moldova and Armenia.