MSPs have voted to keep prescription charges, following a highly-charged debate in the Scottish Parliament.
The SSP wants prescription charges scrapped
A motion to abolish the charges was proposed by the Scottish Socialists and supported by the SNP and the Greens.
But it was defeated by 77 votes to 44 by Labour, the Liberal Democrats and the Tories, with one abstention.
However, ministers have promised to reform the system and introduce more exemptions for chronic conditions, students and those on low incomes.
Scottish Socialist convenor Colin Fox MSP, who brought forward the bill, said that scrapping the charges would cost £45m, but Health Minister Andy Kerr claimed it could cost £245m.
The three-month consultation on the prescription charging system was announced by Deputy Health Minister Lewis Macdonald only hours before the Holyrood debate was due to begin.
However, Mr Fox criticised the consultation as vague.
He said: "This bill has been in front of this parliament for nearly two-and-a-half years, yet the Scottish Executive waits until just three hours before this debate to come forward with proposals."
Mr Fox said that the ideals of the NHS to give equal access to healthcare had been compromised by the charges.
"The reality is that the Queen gets free prescriptions while people on disability allowances do not, 30 members of this parliament get free prescriptions but people on incapacity benefit do not, JK Rowling gets free prescriptions as a new mum but a low paid woman working in the Scottish Parliament must pay in full," he said.
"That's the reality of the dog's dinner of the system that's in front of us."
The health minister said those who could afford the charges should pay
Mr Kerr admitted that there were anomalies in the current system and said that the executive was committed to making the charges "fairer, simpler and affordable to all".
He described the bill as "robbing the poor and the unwell to give to the rich".
Roseanna Cunningham, convenor of the health committee which had backed Mr Fox's bill, said that the executive had withheld evidence about the experience of scrapping the charges in other countries.
"I feel quite aggrieved that this evidence was deliberately held back from the committee, evidence which the executive now puts forward to support their case," the SNP MSP said.
SNP health spokeswoman Shona Robison accused the executive of hypocrisy over some of its proposed reforms.
"We're going to have full-time students exempted, but what about better off full-time students? It's supposed to be about ability to pay," she said.
Dr Nanette Milne, the Conservative health spokeswoman, said the present system was "illogical and inequitable".
She pointed out that the criteria for exemptions had not been reviewed since 1968.
But she added: "The abolition of charges provides financial benefit to people on higher incomes who can and currently do pay for prescriptions, and I think that is probably right."
Liberal Democrat MSP Euan Robson also argued against scrapping the charge and claimed that about 92% of prescriptions were currently free.
He said: "The major problem with abolition is that it is effectively an open-ended spending commitment."
Mr Robson added that the estimated cost did not include factors such as the increased number of people going to GPs for free prescriptions for drugs they would have previously bought over the counter.
Independent MSP Jean Turner said her 25 years as a GP had taught her that the only option was to scrap the charges.
She was backed by another doctor, Green MSP Eleanor Scott, who urged the parliament not to be afraid of making big decisions.
"We have made courageous political decisions here, for example over free personal care for the elderly," she said.
"I think we can't ignore the advice from people like Citizens Advice Scotland who do clearly show some people are slipping through the net with the present system."