The ban on students from the four countries comes amid a rise in anti-immigration sentiment in the UK.