Former Vice President Joe Biden offered words of hope and encouragement to Meghan McCain in an emotional moment on “The View” while the two were discussing Sen. John McCain’s cancer diagnosis.

John McCain, McCain’s father, and Biden’s son, Beau, were both diagnosed with the same form of brain cancer, glioblastoma. John McCain was diagnosed earlier this year.

Beau Biden passed away in 2015.

"There is hope, and if anybody can make it, your dad [can]," Biden told McCain. “Your dad is one of my best friends.”

Biden recalled how John McCain and Beau Biden became friends, and said the Arizona Republican “took care of my Beau” and gave him courage.

The former vice president went on to encourage McCain, saying that breakthroughs in cancer research are occurring, and provided her and others who have loved ones with cancer with some advice.

“The thing that I found, and Beau insisted on and your dad is going to insist on, is you’ve got to maintain hope,” Biden said. “You have to have hope.”

John McCain responded to the segment, and thanked the vice president and his family.

"Thank you @JoeBiden & the entire Biden family for serving as an example & source of strength for my own family," the senator tweeted.