Phelps became the most decorated Olympian ever yesterday after picking up his 19th medal. He also holds the record for being awarded the most gold medals, as he has 15.
Following news of Phelps's success, Obama took to Twitter to offer his congratulations.
"Congrats to Michael Phelps for breaking the all-time Olympic medal record," he wrote. "You've made your country proud. -bo"
Phelps later replied: "Thank you Mr. President!! It's an honour representing the #USA !! The best country in the world!!"
NBC, which has been criticised for its coverage of the Olympics, was recently forced to apologise after spoiling Missy Franklin's victory for viewers.
Photo gallery - London Olympics 2012:
Copyright: Martin Rickett/PA Wire/Press Association Images