Two "life-changing" cystic fibrosis drugs have been rejected for routine use by the NHS in Scotland.
The Scottish Medicines Consortium (SMC) said there were uncertainties about the long-term health benefits of Orkambi and Symkevi in relation to their costs.
Manufacturer Vertex and the Scottish government are now working "as a matter of urgency" to find a way to allow broad access for eligible patients.
Campaigners described the decision as disappointing and unfair.
Orkambi and Symkevi help to improve lung health in patients with cystic fibrosis, but cost about £100,000 per year per patient.
The SMC said it heard "strong evidence" from patient groups and recognised that the decision would be "disappointing".
But chairman Dr Alan MacDonald said: "There remained significant uncertainty around their overall health benefits in the long-term, in relation to their costs.
"In order to be able to accept these medicines the committee will need to be satisfied of their cost-effectiveness and we continue to work with the company to achieve that."
'It's not a pretty thing to watch'
The SNP MP for Motherwell and Wishaw, Marion Fellows - whose three-year-old granddaughter Saoirse suffers from cystic fibrosis - said she was "disappointed" about the decision.
Saoirse was diagnosed with the condition when she was three weeks old and received painful physiotherapy.
Ms Fellows said: "It's not a pretty thing watching a three-week old baby scream when they're getting their first lot of physio and you're told by their parents no, we're not allowed to comfort her because her body has to get used to this.
"Now my granddaughter is used to it, but we still don't want that to happen to other people."
She added: "I will continue in Westminster to deal with the outcome from this result and hope that things in the future pick up and will get better. I'm sure at the end of the day the Scottish government and Vertex can come to some good agreement that will change this decision."
Scottish Health Secretary Jeane Freeman said: "Since the government became aware of the SMC decision last month we have been working with the SMC, the manufacturer and with other interested parties to develop the principles of a solution that can make possible the widest availability of these medicines, wherever clinically appropriate.
"This work continues now, as a matter of urgency."
She said a "considerable number" of Scottish patients have access to Orkambi and Symkevi through the Peer Approved Clinical System Tier 2 (PACS Tier 2), which allows doctors to apply for access on behalf of individual patients.
"This is good news for these patients," added Ms Freeman.
"The government hopes that all parties continue to work together to achieve a positive outcome for all the children and adults with cystic fibrosis in Scotland."
Manufacturer Vertex said it hoped to find a solution which would allow broad access to the drugs in the coming weeks.
In the meantime, it said it would continue to allow access on an individual basis based on clinical need.
David Ramsden, chief executive at the Cystic Fibrosis Trust, said the decision would come as a shock to people with cystic fibrosis and their families.
"While talk of further negotiation between Vertex Pharmaceuticals and the Scottish government is positive, people living in Scotland need these life-saving drugs now," he said.
"The tragic wait has to end and now is the time for the Scottish government to remain committed and Vertex to do all they can to ensure that this chance does not slip away again."
What is Orkambi?
Since 2015, the drug Orkambi has been licensed to treat cystic fibrosis in patients from two-year-olds to adults, who have a specific genetic mutation known as F508del.
It was not available on the NHS, except for certain people on compassionate grounds. Symkevi is used to treat the same mutation in patients age 12 and older.
The mutation causes the production of an abnormal protein that disrupts how water and chloride are transported in the body.
Orkambi has been shown in clinical trials to improve lung function and respiratory symptoms in people with cystic fibrosis.
It is the first of a string of drugs that have been developed, with newer ones expected to be even more effective.
Earlier this year campaigners appealed to the UK government to use its powers to break a deadlock in making Orkambi available on the NHS in England.
Vertex refused a £500m offer for the drug over five years - which was described as the "largest commitment" NHS England had ever made.
Those affected want other drug firms to be asked to make a cheaper version.
The UK government's Department of Health said its approach was still to urge Vertex to accept NHS England's "generous offer".
Cystic fibrosis is a life-shortening genetic condition that causes fatal lung damage, and affects about 10,400 people in the UK - around 900 of them in Scotland.
Only around half of those with the condition live to the age of 40.