The late Sen. John McCain's family plans to support former Vice President Joe Biden's White House bid, backing the Democrat not only in his party's crowded primary race but also in a general election matchup with President Trump, the Washington Examiner has learned.

In an extraordinary snub to Trump, who derided McCain's Vietnam War service and mocked him even after his death last August at age 81, the McCain family is preparing to break with the Republican Party. McCain represented the party in Congress for 35 years and was chosen as its presidential nominee in 2008, losing to Barack Obama.

Sources close to both Biden's presidential campaign and the McCains said that at some point during the White House race, McCain's widow Cindy, 64, and daughter Meghan, 34, a host on "The View," will offer their public support in the hope of removing Trump from office in 2020.

[ Related: Meghan McCain rips Trump: Your ‘pathetic’ life is spent ‘obsessing over great men you could never live up to’]

A former McCain campaign official with close ties to the family said support for Biden was a given, but they needed to calculate how they could best help the former vice president. Both Cindy and Meghan McCain remain Republicans, and one consideration is whether endorsing Biden in the Democratic primary could do him more harm than good. "It's undeniable that Joe Biden and the McCain family have a very close, personal relationship. It's about what's good for him [Biden]."

Another McCain family source said there had been discussions with the Bidens about his 2020 run, which is expected to be announced on Thursday. "They talk regularly and have been supportive of his run," the source said. "The question is going to be timing and coordinating with the Biden campaign. There are a lot of moving parts there and [Biden's campaign is] not necessarily organized. I wouldn't expect a formal family endorsement because some of McCain's family is still in the military, but I do expect Cindy to speak out at some point."

The source said they expected Meghan McCain to speak out in favor of Biden should he get the nomination, but a Cindy McCain endorsement could come sooner.

A Biden campaign source said that Biden himself had talked about his support from the McCains and had discussed whether family members should appear with him during the Democratic primary battle. Biden canceled a launch event scheduled for Wednesday in Charlottesville, Va., and is now due to announce his candidacy via video on Thursday before appearing in Pennsylvania on Monday.

Another former senior McCain aide wondered whether support from the late senator's family would help Biden in a crowded Democratic primary with most other candidates running to his left: "I'm just not sure how much that helps in a primary where the party is constantly moving towards the left. If you're a two-term former vice president and basically tied with Bernie Sanders, that's not a good sign."

The feud between the Trump and McCain clans stretches back nearly two decades. Back when he first considered a presidential run in 2000, Trump questioned McCain's military service by proclaiming he was "captured" during the Vietnam War.

Tensions increased when Trump ran for the GOP nomination during the 2016 presidential election, saying McCain was "weak" on immigration and implied he was an "incompetent" senator. Trump remains livid about McCain's role in disseminating the "dossier" drawn up by former British spy Christopher Steele containing unproven allegations about collusion between the Trump campaign and Russia in 2016 and Trump watching prostitutes urinate on a bed in a Moscow hotel room in 2013.

McCain skipped the Republican convention in 2016, when Trump received their party's presidential nomination. After the release of the infamous "Access Hollywood" tape in October 2016, McCain said it was "impossible to continue to offer even conditional support for his candidacy" and that he could vote for neither Hillary Clinton nor Trump. McCain on Election Day refused to say he voted for Trump, while Meghan McCain said she voted for Evan McMullin, an independent.

Things came to a head after Trump took office and McCain — to Trump's fury — helped doom the Republican attempt to repeal Obamacare. Trump was not invited to the senator's funeral, during which Meghan McCain delivered pointed jabs at the president, saying: "We gather here to mourn the passing of American greatness. The real thing, not cheap rhetoric from men who will never come near the sacrifice he gave so willingly, nor the opportunistic appropriation of those who lived lives of comfort and privilege.”

[ Opinion: Why Trump hates John McCain so much]

Meghan McCain later slammed Ivanka Trump, the president's daughter, and her husband Jared Kushner, for attending the funeral, saying: "I thought that my family had made it clear, or at least I had, that the Trumps are unwelcome around me, and that my father had been sort of very clear about the line between the McCains and the Trumps."

One statesman who did attend the funeral was Biden. Through tears, Biden eulogized McCain, beginning: “My name’s Joe Biden. I’m a Democrat. And I loved John McCain." He added: “The way I look at it, the way I thought about it, was that I always thought of John as a brother,” Biden said. “We had a hell of a lot of family fights. We go a long way.”

Reminiscing about his time in the Senate with McCain, Biden said that despite their political differences, they shared hopes and goals: “We were both full of dreams and ambitions, and an overwhelming desire to make the time we had there worthwhile, to try to do the right thing, to think about how much we could make things better for the country we loved so much."

The two families have known each other for decades, and after Biden left office, the they have developed an even closer relationship, and Cindy McCain talks to the Bidens regularly.

The families were drawn further together when McCain came down with brain cancer, the same illness Biden’s son Beau died of at the age of 46. During an emotional appearance with Meghan McCain on The View while McCain was ill but still alive, Biden sought to comfort her, saying of him and McCain, “We’re like two brother who were somehow raised by different fathers or something, because of our points of view.” After her father's death, Meghan McCain said Biden and his family helped her through her grief.

Several longtime staffers and aides to McCain have left the GOP since Trump's election. Mark Salter, a close confidante to the McCain family for nearly 30 years, urged the public to vote for Democrats in the 2018 midterm elections. "Vote For the Democrat (in most cases). That feels weird to write. But the bigger the rebuke of Trump the better for the country. Resist," Salter tweeted on Nov. 6, 2018.

Steve Schmidt, McCain's former presidential campaign chairman, renounced the GOP in 2018 as well, calling the party "corrupt" and "immoral."

In March, Meghan McCain suggested on her show "The View" that Trump felt haunted by her late father: “Listen, he spends his weekend, obsessing over great men because he knows it and I know it and all of you know it. He will never be a great man. And so, my father was his kryptonite in life. He will be his kryptonite in death."