Amy Callaghan, the MP for East Dunbartonshire, has undergone neurosurgery after suffering a brain haemorrhage.
The SNP MP collapsed at her home last Wednesday.
A statement from her office said the 28-year-old was in a stable condition and was “now beginning the process of recovery”.
It added that Ms Callaghan’s collapse was “related to a previously manageable medical condition”.
She has previously spoken about being diagnosed with melanoma aged 19, but has been cancer-free for six years.
- Who is the young SNP MP who beat Jo Swinson?
- Amy Callaghan on battling cancer and going into politics
Ms Callaghan is said to be in good spirits and able to communicate well with her family.
Scotland’s First Minister Nicola Sturgeon tweeted her support for the MP, sending her “lots of love and strength”.
The SNP’s leader at Westminster, Ian Blackford, said everyone in the party wished the MP a full and speedy recover.
‘Rest and recovery’
Ms Callaghan was elected to the House of Commons at the 2019 general election.
She unseated the then Liberal Democrat leader, Jo Swinson, with a narrow majority of 149 votes.
Her office said she would now undergo “a period of required rest and recovery”.
“It is the privilege of her life to be elected as the Member of Parliament for East Dunbartonshire,” a statement said.
“There is absolutely no doubt that Amy will come back stronger, fitter and more determined than ever to continue in that role and serve, to the best of her ability, the people of her constituency.”