Pedro, a 79-year-old coronavirus patient in Badajoz, southwest Spain, had tested positive for Covid-19 five times and was feeling down after showing symptoms for 46 days.
Carlos Hernández Teixidó, a doctor at Badajoz University Hospital, turned to Twitter for help after struggling to lift Pedro's spirits.
"He is despondent and ready to throw in the towel," tweeted Hernández Tuesday. "Twitter, do your magic."
The response was overwhelming, and the doctor received more than 8,100 replies, plus direct messages. The post also attracted more than 31,000 likes and thousands of retweets.
"I have just spoken to Pedro and his daughter," Hernández told his Twitter followers less than 24 hours after his initial post. "You don't know how moved both of them were. I have given his daughter the first 300 messages."
Pedro is feeling "much better" and his granddaughter will read him the rest of the messages from Twitter, said Hernández. "You are incredible!" he added.
In all, Hernández received more than 15,000 direct messages for Pedro, he told CNN Thursday.
"Not just messages but people have sent pictures, videos, some even played music to try and cheer him up," he said.
"We decided to post the tweet to try and get around 15 people to send him a message to lift his spirits," Hernández said, confessing he was very surprised at the outpouring of support.
"We posted it at 3 o'clock in the afternoon a