Scottish postgraduates faced by a shock payment of more than £2000 are to be allowed to put off paying the fee until the end of their studies, the Scottish Government said yesterday.

Fiona Hyslop, the Education Secretary, said the law would be changed by the end of the current parliamentary session to allow students who faced the demand to defer until after they graduate.

The move follows revelations in The Herald that 2500 postgraduates had been told to fork out an immediate £2200 to pay a one-off charge called the graduate endowment - which they had previously been allowed to postpone.

The Scottish Labour Party and NUS Scotland, who both campaigned on the issue after being contacted by concerned students, welcomed the move, but said the payments had caused "needless grief".

The problem is an unintended consequence of the scrapping of the graduate endowment fee by the SNP-run government as a means of reducing the burden of student debt. The former Scottish Executive introduced the fee as a means of levering more money into the higher education system, but allowed postgraduate students to defer until completion of their studies.

However, because the scheme was wound up as a result of the SNP's decision to scrap the charge, all outstanding debts were collected by the Student Awards Agency for Scotland, which administers the endowment on behalf of the government.

In a letter sent to students in March, the agency invited those who could not pay upfront to take out a student loan to cover the cost - causing anger that a measure intended to reduce student debt was adding to it.

Yesterday, Ms Hyslop told The Herald all those affected would now be allowed to defer as originally planned.

She said part of the problem was the previous administration had relied on "an act of goodwill" to allow postgraduates to defer, rather than putting in place legal measures.

"Since the recent press coverage, my officials have been working very quickly to more closely examine this area," she said. "A critical issue which has emerged in the past weeks is that the practice of allowing students to defer the payment is not supported in the relevant regulations which has created a challenging position for us to address."

Ms Hyslop said regulations would be put in place on the last day of the current session of the Scottish Parliament, June 30, to ensure students could have the choice of meeting their liability once they finish their studies, by cash or a student loan if necessary.

For students who had already paid or taken out a student loan, Ms Hyslop said "every option" was being explored to see if they could be restored to their original position "so they too can defer payment".

James Alexander, president of NUS Scotland, said: ".The government is acknowledging the difficulty that debt and hardship can cause for all level of students and we welcome this decision."