The European commission has cast serious doubt on the legality of Alex Salmond's plans to continue charging university tuition fees for English, Welsh and Northern Irish students in an independent Scotland.

A spokesman for Androulla Vassiliou, the education commissioner, told the Guardian European treaties prohibited any member state from discriminating against other EU citizens on "conditions of access to education, including tuition fees".

The statement escalated a dispute over the future of one of the Scottish government's most prized and popular policies: giving all Scottish-domiciled and EU students free university tuition, while charging an average of £7,500 a year for all other UK students.

Mike Russell, the Scottish education minister, fears giving free tuition to all UK students would lead to a flood of "fee refugees" applying to escape charges of up to £9,000 a year at top English colleges.

He has estimated that would see a quadrupling of UK student numbers in Scotland, which could cost the Scottish government up to £150m.

Scottish ministers are allowed to discriminate against students from England, Wales and Northern Ireland because of a quirk in EU law: since they are citizens of the same member state as Scottish residents – the UK – EU law does not apply to them.

The commission statement comes after Salmond claimed at the weekend that a future independent Scottish government would still be able to impose fees on students from the rest of the UK – even though the UK would be a different EU member state.

He sought to brush off criticisms from academics, insisting his view was backed up by independent legal advice to Universities Scotland, the umbrella group for all Scottish higher education institutions; Universities Scotland disputes that claim.

Speaking on BBC 1's Sunday Politics, the first minister said his government's white paper on independence was based on legal advice that said there was an "objective" basis under EU law for discriminating against UK students.

"Everything in the white paper is consistent with the advice we've received," he said.

The white paper said Scotland would be protected by EU rules against a member state's public health being harmed by EU policies, "based on the unique and exceptional position of Scotland in relation to other parts of the UK."

But the commission says the EU treaties prevent discrimination based on nationality.

Vassiliou's spokesman declined to discuss the specific arguments set out in the independence white paper. But, asked about the specific policy of offering EU citizens free tuition, he said: "Unequal treatment based on nationality (or on residence, which in many cases is, de facto, based on nationality) is regarded as discrimination, which is prohibited by article 18 of the treaty on the functioning of the EU, whenever such treatment falls within the scope of treaty. This is the case for the conditions of access to education, including tuition fees."

David Caldwell, the former director of Universities Scotland, now an active member of the anti-independence campaign Academics Together, said the commission statement was consistent with expert academic and legal opinion that it would be extremely difficult to continue treating UK students differently after independence.

"It does seem highly implausible that the proposal set out in the white paper could work. It does look, on the face of it, that they would be bound to be declared illegal," Caldwell said.

"I wouldn't go so far as to say it's totally impossible. But on the basis of what we know so far, it does seem extraordinarily unlikely that the proposals in the white paper could be implemented."

Experts on EU law from the universities of Edinburgh and Aberdeen and the Edinburgh law firm Anderson Strathern – which produced the Universities Scotland advice cited by Salmond – all state that charging UK students fees after independence would run foul of EU law.

Niamh Nic Shuibhne, professor of European Union law at the University of Edinburgh, argues that EU anti-discrimination laws in the education system are very difficult to evade, making it highly unlikely that treating UK students differently would be legal.

"The Scottish government would face an extremely steep uphill battle to convince the EU institutions that it should be entitled to retain a practice involving systemic direct discrimination against one particular cohort of EU citizens," she stated last month.

"There is therefore a substantial hole in the Scottish government's plans for funding higher education in Scotland," he said.

The Scottish government stuck by its proposal, however. "The position outlined by the spokesman for the commissioner adds nothing new," a spokeswoman said.

"The requirements of the EU allow for objective justification – that is, clear evidence of exceptional circumstances. This is explicitly acknowledged where it [the white paper] expressly identifies objective justification as the basis of our approach."

Alex Salmond's insistence that Scotland could still charge students from the rest of the UK university fees after independence is being severely tested: the question is being raised whether free tuition fees can survive independence at all