English university students could be charged up to £9,000 in tuition fees in Scotland to prevent Scottish universities being "swamped" by students fleeing higher charges elsewhere in the UK.

The much higher than expected annual charge was announced by Michael Russell, the Scottish education secretary, after he came under intense pressure from Scottish universities to allow them to keep pace with their wealthier English competitors.

He insisted the new limit – which could allow colleges to charge five times more than the current £1,820 basic fee – was primarily to allow universities such as St Andrews, Edinburgh and Glasgow to close a significant funding gap after the UK government introduced fees of up to £9,000 for English university places.

The proposals were welcomed by university principals but condemned by student leaders, who accused Russell of hypocrisy and said he had mimicked the worst policies being pursued in England by creating a "market" for university education in Scotland.

Scotland's universities have warned current funding levels would leave them at least £202m short next year because Alex Salmond's government refuses to introduce fees for Scottish students, yet has cut funding by £67m next year.

But Russell also admitted the heftier new fees were designed to limit "cross border flow" from English students escaping £9,000 fees. He told the Scottish parliament he had discussed his new proposals in a private call to David Willets, the UK education secretary, before his statement to MSPs.

"We want to maintain cross border flows – they're important to all of us - but none of us should find ourselves in the position of being swamped by others from elsewhere," he said.

About 22,500 English students attend Scottish universities, frequently the most prestigious and now potentially most expensive courses such as medicine, where they currently pay £2,895 a year in fees, and the highest achieving universities such as St Andrew's and Edinburgh.

Russell's proposals – which are certain to be endorsed by Holyrood because of the Scottish National party's overall majority – have been introduced after it emerged that the numbers of students from England, Wales and Northern Ireland, and the EU, have increased sharply.

The announcement was immediately welcomed by Universities Scotland, the umbrella body, which said it would now use this new limit voluntarily for the 2012/13 academic year until it was embedded in new legislation for the following year.

After general assurances from Russell about introducing new legislation to protect places for poor students, Universities Scotland also promised to produce improved bursaries and scholarships for less well-off applicants. It said the new fees for 2012 would be published by September this year.

Professor Ian Diamond, the principal at Aberdeen university, said: "Universities are in no doubt that today's announcement on rest-of-UK fees represents a very difficult choice both for government and for universities. But equally, there is no doubt that change is absolutely necessary.

"Keeping a single flat-rate fee for students from the rest of the UK is no longer an option. It wouldn't work for prospective UK students, who are not a homogenous group, nor would it work for Scotland's universities – who are far from homogenous themselves."

However, the National Union of Students was fiercely critical of the new fees, saying Scotland was now the most expensive place in the UK to study. Because Scottish universities normally run four year courses, against three years usually offered in England, a student could pay £36,000 in fees in Scotland, against £27,000 for a comparable course in England.

Robin Parker, president-elect of NUS Scotland, said: "There's more than an element of hypocrisy here. The SNP rejected a market in tuition fees for Scottish students prior to the election, only to introduce one immediately after for students from the rest of the UK.

"This seems incredibly unfair, especially when the SNP have talked so much about the importance of access to university based on ability not ability to pay.

"And by introducing a market into education in Scotland, we're seeing some of the worst aspects of the proposals down south come to Scotland, directly against our tradition of fair access to university."

Parker's complaint was echoed by Ken MacIntosh, Labour's education spokesman. He said people would be "astonished" that Scottish courses could now potentially be the most expensive.

"There is a real danger that the SNP's plans to over-charge students from the rest of the UK will be counterproductive. At this level, they risk deterring students from studying in Scotland altogether and having the perverse effect of making the funding gap bigger not smaller," he said.

Russell told the Scottish parliament he had decided to allow Scotland's universities the freedom to set their own fees for students from the rest of the UK, setting charges on a course by course basis from £1,800 to £9,000 a year.

He estimated that the average fee would be £6,375, based on figures from a joint Universities Scotland and Scottish government working group, a figure lower than the expected average in England. He added that Scottish taxpayers fully fund places for about 12,000 Scottish students at English colleges.

He also confirmed that he plans at a later stage to introduce new service charges for European Union students from outside the UK, similar to Ireland's model, to prevent Europeans from taking advantage of Scotland's often cheaper charges and fees.

Russell's officials have estimated that EU students "cost" the Scottish taxpayer about £75m a year. Numbers have doubled to nearly 16,000 last year. Under EU law, because Scottish students get free higher education, any student from another member state is entitled to the same privileges.

However, because Scotland is not a member state of the EU, a loophole in European law means the same requirement to treat other UK students equally does not apply. As a result, English, Welsh and Northern Irish students have to pay whatever fee the Scottish government and universities choose.