SNP MP Amy Callaghan has left hospital four months after suffering a brain haemorrhage.
The East Dunbartonshire MP was found by her partner after collapsing at her home in June.
She has since undergone what she described as two "life-saving" surgeries.
Ms Callaghan, 28, tweeted a picture of herself holding a crutch in the air after leaving the Queen Elizabeth University Hospital in Glasgow.
She said: "After 4 months in hospital, today I've been discharged. I'm coming home.
"To the miracle team at NHSGGC PDRU - now my second family - thank you, I can never, ever repay you.
"I was wheeled in here. Now I'm walking out. I'm just getting started too."
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.
After her collapse in June, a statement from her office said it 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.