Former US President Bill Clinton has been released from hospital in New York five days after undergoing quadruple heart bypass surgery.
Mr Clinton faces at least two months of recuperation at home
Mr Clinton's spokesman said the 58-year-old was in good spirits and was recovering at his home in the city's Chappaqua suburb.
The former president was taken to hospital a week ago after complaining of chest pains and shortness of breath.
Doctors said he risked a "substantial" heart attack without the operation.
"The president is in good spirits and has taken short walks in the hospital hallway and in his home today," said Mr Clinton's office in a statement on Friday.
His wife, Senator Hillary Clinton, and their daughter Chelsea also issued a statement of thanks for more than 85,000 get-well messages they had received.
"Your thoughts and prayers meant so much to us, and helped keep our spirits strong," they said.
"We feel blessed to have such support, and it will continue to sustain us throughout the months of recuperation that remain ahead."
Mr Clinton is thought to need at least two to three months to return to full health.
Correspondents say he will now be less likely to campaign for Democrat candidate John Kerry ahead of November's presidential elections.
Mr Clinton was admitted to hospital a week ago suffering pains in his chest and breathing difficulties and underwent surgery on Monday.
Doctors revealed on Tuesday that he had been in imminent danger of a major heart attack before the operation.
Mr Clinton served two terms as president, during which he became known for his love of fast food and jogging.
But during his presidency, he showed no signs of heart problems during rigorous health examinations that were made public.