Hoffman, 74, who owns a £10 million house in Kensington, was walking in the park when he saw Mr Dempster stagger and collapse near the Albert Memorial.

He raced over to help and stayed by Mr Dempster’s side for 20 minutes as paramedics Martin Macarthur and Luke Sullivan used a defibrillator to restart his heart.

The veteran screen star told the ambulance crew he saw Mr Dempster “staggering and frothing at the mouth” before collapsing and smashing his face on the ground, cutting his mouth and nose. He congratulated them on saving him, saying: “Great job, guys.”

Mr Dempster, from Kensington, was taken to Chelsea and Westminster Hospital before being transferred to Royal Brompton Hospital. He is now recovering at home after the April 27 drama.

He said: “I want to say thank you to Dustin Hoffman. He saved my life. I have no memory of what happened. The paramedics told me I had been saved by him. It’s unbelievable. I can’t wait to get running around the park again.”

He posted pictures of himself on his blog, posing with a novelty Dustin Hoffman “Get Well Soon” mug and a copy of the film Rain Man, for which Hoffman won the best actor Oscar in 1989.

He wrote that he was “indebted” to the actor, adding: “A big thank you to my new-found favourite star Dustin Hoffman who called 999 and waited by my side until paramedics arrived.”

Mr Macarthur, 45, said that without the star’s swift actions, the outcome “would have been very bad”. He added: “When you are dealing with cardiac arrest it is seconds, not minutes that count.

“Any time you turn up the witnesses are the most important people because they can tell you exactly what has happened before the collapse. And there was Dustin Hoffman. It was quite surreal having a Hollywood A-lister giving me the hand-over but you have to remain professional considering how serious the situation was.

“We got there very quickly and it was obvious Sam was in cardiac arrest. He was taking dying breaths so we had to act fast. Dustin had turned him over on to his back which was really useful and would have assisted in making sure his airway was open.

“We gave him CPR and then shocked him with defibrillators. Dustin was really interested in what was happening but did not interfere in any way. Once we had resuscitated Sam, Dustin came over and said ‘Great job, guys’. We get thanked a lot in our job but it is something a bit special coming from the man himself.”

The 999 crew took the actor’s iPod and sunglasses away, thinking they were Mr Dempster’s. They have since been returned.

Mr Dempster was fitted with the same type of life-saving device as footballer Fabrice Muamba which shocks the heart if it detects a problem.

The Bolton Wanderers player, 24, made an amazing recovery after collapsing during an FA Cup tie at the Spurs ground in March and “dying” for 78 minutes before being resuscitated.