Sen. John McCain died exactly nine years after his friend Sen. Ted Kennedy — and of exactly the same thing.

Kennedy, a Democrat, passed away Aug. 25, 2009 at age 77, after a battle with glioblastoma — the same rare type of brain cancer afflicting McCain, who died Saturday at age 81.

McCain, a Republican, had fondly recalled their friendship despite their ideological differences.

“Ted Kennedy had this unique way of doing hand-to-hand combat on the floor of the Senate,” McCain told CNN following Kennedy’s death.

“As soon as we stopped our speech making, he’d come over and put his arm around you and — and make everybody appreciate that we had our differences politically, but personally, we could be friends and work together as colleagues and friends for the good of the country.”

On Saturday, Kennedy’s widow returned the kind words.

“Getting to know John McCain was one of the great privileges of my life, and I know my late husband Ted felt the same way,” Vicki Kennedy said in a statement.

“Though he and Teddy had different political philosophies and were from different political parties, they both loved this country and loved each other. John McCain was our friend, and I will miss him, profoundly.”