THE government, half way through its term, is now focusing on the next election. That was clear from the two political stories that dominated the rentrée: the cabinet reshuffle and the revocation of London Metropolitan University’s licence to teach foreign students. The first illustrates some sensible ways in which the government is reacting to voters’ concerns (see article). The second is a nasty piece of populism.

Hostility to immigrants is rising all over Europe, but opinion polls suggest it is worse in Britain than in any other rich country. David Cameron’s government came to power promising to cut net migration to “tens of thousands” by the next election. This was not only wrong, in terms of both Britain’s obligations and its economic needs, but also impractical, since last year the number was 216,000. Since many immigrants are entitled to entry—because, for instance, they come from the EU—turning away students, who account for about 40% of the total, is pretty much the only way of cutting numbers significantly. So Mr Cameron has had to curtail the right to work after graduation—especially tough for students from poor countries, who need to work to repay the median annual cost of courses of £11,200 ($17,800). And universities have been required to keep an ever-closer watch on foreign students to ensure that they are in Britain to study, not to work. That is the policy of which London Metropolitan (LMU) fell foul.

What will happen to LMU is unclear, since it is taking the government to court. It blames its problems in part on the rules requiring universities to monitor students which, it says, have changed 14 times in the past three years. A report by a parliamentary committee, published this week but written before the revocation of LMU’s licence, describes the system as “poorly planned and ill thought out”. What will happen to LMU’s bona fide foreign students is equally uncertain. The government is helping them find places at other universities, but there is no guarantee they will get them, nor is any system in place to compensate them. They have been cruelly treated.

The many benefits of teaching foreigners

It is right for the government to keep a watch on colleges and universities to ensure that they are not being used as conduits for workers pretending to be students. When aspiring migrants outnumber society’s ability to absorb them, immigration should be restricted. But the desire for social stability needs to be balanced against other goods, such as prosperity.

In the wake of the economic crisis, the government is keen to foster industries other than financial services with export potential. Higher education is one. A government report estimates earnings from foreign students at around £7 billion a year, and suggests that could double by 2025. And there are far broader potential gains. Foreigners who study in Britain are likelier to create wealth in the country later on. Education is the most effective way of wielding the “soft power” that is voguish in foreign-policy circles—bringing people round to your point of view without training your guns on them, in other words. All that is jeopardised by using universities as an arm of the UK Border Agency. The job of universities is to teach students, not to police the country’s frontiers.

If Mr Cameron insists on capping migrant numbers, he should exempt students, who contribute not just to the country’s coffers but also to its intellectual wealth, and who stay for a limited time. Better still, adopt a more liberal approach, and remember how Britain first became great: through openness to the world, not through xenophobia and isolationism.