From next year, students from England, Wales and Northern Ireland will have to pay Pounds 1,000 more to complete a Scottish degree course than Scottish students, and those from all other European Union countries.
The bizarre ruling will lead to students from Greece paying Pounds 3,000 to complete a four-year degree in Scotland - while students from just over the Scottish border, or from anywhere else in the UK, will pay Pounds 4,000.
And illogical though it sounds, it all makes perfect sense to the Scottish Office. Academics and unions had complained that the new Pounds 1,000-a-year tuition fees would discourage Scots from studying for the traditional four-year courses in Scotland, and encourage them to save Pounds 1,000 by travelling south to an English university . . . and a three-year course.
The Scottish Office announced on Monday it would therefore exempt Scots from paying for the final year of their courses in Scottish universities.
Then Scottish universities complained that they would suffer because English students would be driven away - and other Europeans were going to be treated as honorary Scots. It sounded like a classic case of discrimination: not so, said the Government.
A spokeswoman for the Department for Education and Employment said: "Students from other European Union countries will be treated in the same way as Scottish students - they can't be treated any differently under EU law.
"But students from England, Wales and Northern Ireland will be treated differently. It's not discriminatory, because they can opt to do a three-year course at a Scottish university."
Jack Rabinowicz, chairman of the Education Law Association, said he believed the move was technically legal under European law, because discrimination within nation states is not prohibited. But he said the forthcoming creation of a Scottish Parliament could mean English students could then make a challenge in the courts.
Lesley Lind, spokeswoman for the University of St Andrews, said the additional charge could create serious difficulties.
St Andrews is popular with English and Northern Irish students: in 1996-97, its 6,020-strong student population was just 37 per cent Scottish. "We regret this decision," said Ms Lind. "It may have a marked effect on cross-border flow."