Tony Blair has said he is "absolutely fine" after hospital treatment to correct an irregular heartbeat.
Mr Blair paid tribute to hospital staff
Mr Blair arrived back in Downing Street after undergoing a procedure at London's Hammersmith hospital.
Spokesman Simon Wilde said the risk of recurrence was "very low" and that the "atrial flutter" had been eliminated.
Mr Blair has said in a BBC interview that he intends to serve a full third term in office if elected, but he ruled out running for a fourth.
Mr Blair paid tribute to the Hammersmith Hospital staff saying: "From the porters to the doctors, nurses and consultants, their care was fantastic.
"It reflects the tremendous dedication, expertise and commitment NHS staff show everyday throughout the country."
Chancellor Gordon Brown, who is in Washington, told the BBC his thoughts were with Mr Blair and his family.
"I think the whole country will wish him well.
"It's gone very successfully."
The procedure performed on Mr Blair is called catheter ablation - a simple technique which thousands of patients in the UK undergo each year.
A wire is inserted through veins into the heart cavity allowing doctors to "map" the rhythm disorder.
It is then manoeuvred next to that point and pulses of energy are sent down it which should correct the heart's rhythm.
Patients usually spend the night in hospital and are back at work within two to three days.
Blair wants to serve a third term but not a fourth
Deputy Prime Minister John Prescott said Mr Blair's treatment was a "regular procedure" adding he was someone who "bounced back".
He added that Mr Blair had announced his intention to serve a full third term to quell "vote Blair get Brown" speculation.
"He has made his position absolutely clear ... he will be a very effective prime minister right to the time he went," said Mr Prescott.
Before the procedure, Mr Blair described his condition as "not particularly alarming" and said it had not "impeded" his work.
He told BBC political editor Andrew Marr in an interview that he felt he could still make a "real contribution" to the country.
"If I am elected I would serve a full third term. I do not want to serve a fourth term."
"I don't think the British people would want a prime minister to go on that long but I think it's sensible to make plain my intention now."
Mr Blair went on to say Gordon Brown would be "very capable" of being prime minister.
"I don't think it rules Gordon out in any shape or form at all - he'd be younger than many prime ministers have been if he took over at the end of a third term," he said.
The BBC's Andrew Marr later described Mr Blair's announcement of his intention to serve a third term as "quite extraordinary".
"It sends a very, very clear message to all his critics in the party, including to those people called Brownites, that he intends to be there for a very long time," he said.
Tory leader Michael Howard said: "I am sorry to hear about the prime minister's ill health. I wish him well and a speedy recovery."
'War of succession'
Tory co-chairman Liam Fox also wished the prime minister well.
But he added that Mr Blair's decision not to seek a fourth term, if he won a third, meant those in Labour with leadership ambitions would be lining up to bid for the position.
"Now we are going to have the entire Cabinet under starter's orders in the next Parliament, and that is going to be very destabilising - a perpetual war of succession," he told BBC Radio 4's Today Programme.