King Charles left hospital on Monday three days after he was admitted for treatment for an enlarged prostate.
Charles, 75, emerged from the London Clinic, near Regent's Park, with Queen Camilla just before 3pm on Monday.
The King appeared in good spirits as he waved to crowds outside the private hospital.
He underwent a corrective procedure for the benign condition and it has been reported he could take up to a month off from public duties as he recuperates.
Buckingham Palace said in a statement: "The King was this afternoon discharged from hospital following planned medical treatment and has rescheduled forthcoming public engagements to allow for a period of private recuperation.
"His Majesty would like to thank the medical team and all those involved in supporting his hospital visit, and is grateful for all the kind messages he has received in recent days."
The road had been cleared but a large crowd of children and onlookers had gathered to watch as they got into a waiting car.
There was a strong presence of uniformed police officers who stood guard as the royal couple were driven away.
Camilla had arrived, via a side entrance of the clinic at 2.10pm.
The King was diagnosed with the benign condition on January 17 while staying at Birkhall in Scotland, after going for a check-up because he was experiencing symptoms.
He is understood to have wanted to share the news to encourage other men to get themselves checked.
The King, who acceded to the throne 16 months ago, was urged to rest by his doctors ahead of the corrective procedure.
NHS England said the “enlarged prostate” page on the NHS website received one visit every five seconds on the day the King’s diagnosis was announced, with further huge boosts in visits in the days that followed.
Buckingham Palace has said the King was “delighted” to learn his diagnosis was having a “positive impact on public health awareness”.
The King “deserves credit” for increasing awareness of prostate issues after sharing news about his own operation, Downing Street has said.
Asked about Rishi Sunak’s reaction to Charles leaving hospital after treatment for an enlarged prostate, the Prime Minister’s official spokesman said: “He’s obviously pleased he’s made a very swift recovery.
“He also deserves credit for raising awareness of an important issue.
“I understand the NHS website has seen a significant increase in people using it around that issue, and that’s to his credit.”
One in three men over the age of 50 will have symptoms of an enlarged prostate, including needing to visit the toilet more often and with more urgency and difficulty emptying the bladder.
An enlarged prostate, known as benign prostatic hyperplasia, does not usually pose a serious threat to health and it is not cancer.
But patients may need to have several tests for the condition to rule out the possibility they have another illness with similar symptoms, such as prostate cancer.
Surgery is usually only recommended for moderate to severe symptoms which have not responded to medicine, the NHS website says.
Charles spent time at Kate's bedside before his own treatment.
She returned to her home in Windsor almost two weeks after undergoing major abdominal surgery, Kensington Palace has said.
She was admitted to the London Clinic for a planned operation on January 16.
The 42-year-old future Queen is not expected to return to official duties until after Easter, and the Prince of Wales has temporarily stepped back from his royal role to juggle caring for her and their children.
A Kensington Palace spokesperson said: “The Princess of Wales has returned home to Windsor to continue her recovery from surgery. She is making good progress.
“The Prince and Princess wish to say a huge thank you to the entire team at The London Clinic, especially the dedicated nursing staff, for the care they have provided.
“The Wales family continues to be grateful for the well wishes they have received from around the world.”
It is understood her return to official duties will depend on medical advice nearer the time.