Updated

Cindy McCain, the wife of the late Republican Sen. John  McCain, announced on Twitter late Tuesday that she has endorsed Joe Biden in his 2020 presidential campaign against President Trump.

"My husband John lived by a code: country first. We are Republicans, yes, but Americans foremost. There's only one candidate in this race who stands up for our values as a nation, and that is @JoeBiden," she tweeted.

Biden responded to her endorsement, "I'm deeply honored to have your support and your friendship. This election is bigger than any one political party. It requires all of us to come together as one America to restore the soul of the nation. Together, we'll get it done."

Biden announced Tuesday that McCain decided to endorse him after Trump's alleged remarks about U.S. services members as reported by The Atlantic.

“Maybe I shouldn’t say it but I'm about to go on one of these Zooms with John McCain's wife, who is -- first time ever -- is endorsing me because of what he talks about with my son and John’s who are heroes, who served their country, you know he said they’re losers, they’re suckers,” Biden said during a fundraiser Tuesday.

Trump criticized U.S. service members on numerous occasions, referred to American war dead as “losers” and asked that disabled veterans be excluded from military parades, according to the magazine. Trump has denied ever making the comments.

CINDY MCCAIN PRAISES BIDEN IN DNC VIDEO 

“The Atlantic Magazine is dying, like most magazines, so they make up a fake story in order to gain some relevance. Story already refuted, but this is what we are up against. Just like the Fake Dossier,” he said on Twitter.

McCain's wife had already praised Biden in a video at the Democratic National Convention, but did not formally endorse him then.

"It was a friendship that shouldn't have worked," she says in the video, describing the relationship of her late husband, an Arizona Republican, and Biden, a Delaware Democrat.

She explains that her husband and Biden got to know each other in the 1970s, when McCain -- newly home from service in the Navy -- was assigned to be a military aide for Biden and they logged thousands of miles together on overseas trips.

John McCain is heard in the video claiming his job was to carry Biden's bags.

"The son-of-a-gun never carried my bags," Biden answers back. "He was supposed to carry my bags, damn it, but he never carried my bags."

Cindy McCain's participation in the video was among a number of attempts by Democrats to show that Biden has attracted the support from some longtime Republicans as he looks to deny Trump a second term this November.

John McCain was the 2008 Republican presidential nominee against Barack Obama, who won the election with Biden as his running mate.

Both Cindy McCain and her daughter Meghan have been outspoken critics of President Trump, and the family is longtime friends with the Bidens.

Trump first targeted John McCain personally in 2015, saying the former prisoner of war wasn't a hero "because he was captured. I like people who weren't captured."

McCain later angered Trump with his dramatic thumbs-down vote against repealing President Obama's health care law. Before McCain died of cancer in August 2018, reports suggested he made an explicit request that Trump not be invited to his funeral.

CLICK HERE TO GET THE FOX NEWS APP

Biden consoled Meghan McCain during an appearance on "The View" after her father was diagnosed with the cancer that eventually took his life. She has said Biden often reaches out to her to offer support, after losing his own son Beau to the same cancer in 2015.

Fox News' Bradford Betz and David Aaro and Edmund DeMarche contributed to this report.