Equalities minister Jo Swinson has praised staff at a Glasgow hospital for "keeping her alive" after an allergic reaction to a biscuit.
The Liberal Democrat MP, who has a nut allergy, unwittingly ate a snack containing nuts at a charity cake sale on Saturday.
She started to feel unwell and before long went into anaphylactic shock.
Doctors gave her adrenaline to reverse the shock after she collapsed, struggling for breath.
The MP for East Dunbartonshire told the Scotsman: "Almost instantly I felt a tingling sensation so I knew I had unknowingly eaten a nut. It's difficult to always know whether something contains nuts or not - and this time I got it wrong."
Ms Swinson's mother drove her to Glasgow's Southern General Hospital, where doctors injected her with an Epipen containing adrenaline.
"I had taken the precaution of writing out what had happened in case my throat swelled up so much I couldn't speak," she said.
She was also given steroids and put on oxygen, and kept in overnight to make sure she did not suffer any further adverse reactions.
The 33-year-old, who has suffered from a peanut allergy for 30 years, said: "It was a very scary experience.
"Luckily, once you get the right treatment you recover very quickly from it - but the bottom line is that if you don't get help, you can die."
Ms Swinson urged anyone with a nut allergy to take precautions.
"The message I would really like to put out is that anyone with a nut allergy should always carry an Epipen," she warned.
"They should also make sure their friends know what to do to treat them."
Anaphylaxis is a severe allergic reaction that can cause a person's airways to become constricted, and can lead to cardiac arrest and death.
Common causes include foods such as peanuts, tree nuts, sesame, fish, shellfish, dairy products and eggs. Non-food causes include wasp or bee stings, rubber, penicillin and other drugs or injections.