Other countries had threatened to pull out of the games unless Russian and Belarusian athletes were banned.