Forty-two countries participated in the contest. Portugal and Romania returned to the contest after a year's absence, while Bosnia and Herzegovina withdrew on financial grounds. Russia had originally planned to participate, but announced their withdrawal on 13 April 2017, after their representative, Julia Samoylova, was banned from entering Ukraine by virtue of having travelled directly from Russia to Crimea in 2015, a region that was annexed by Russia in 2014, to give a performance, which is illegal under Ukrainian law.