Republican Sen. John McCain, a war hero who suffered five-and-a-half years as a prisoner of war in the infamous “Hanoi Hilton” prison camp in Vietnam, and who became an independent, influential senator who represented Arizona for 35 years in the House and Senate, died on Saturday at 81 at his home, having recently ended treatment against a virulent form of cancer.

The New York Times obituary by Robert McFadden, posted Saturday evening, was broadly admiring with some scattered black marks (and a lot more about Donald Trump than one might expect).

But the Times hasn’t always treated Sen. McCain so respectfully. Look back to the 2008 campaign. McCain, seen as a moderate “maverick” by the Times and other outlets, was the paper’s clear personal favorite during the Republican primaries. But after he became the only person standing between a history-making Democratic president (either the first black president, Barack Obama, or the first female president, Hillary Clinton), the Times' treatment of McCain turned hostile, with reporters in turn suggesting McCain was too old or even constitutionally ineligible for office, a “warmonger” with “hints of racism,” who may have had an affair with a lobbyist and who spread vicious anti-Obama falsehoods on the campaign trail.

Here's a just a small sample of the paper's attacks.

Too Old to Run?

Reporter Michael Cooper:

The quest to win the presidency at an age when he would be too old to be a commercial airline pilot or even a judge in some states has already led Mr. McCain to adopt a more grueling campaign schedule, and a more vigorous style, than several of his younger rivals.... (Not to be morbid, but eight vice presidents have succeeded presidents who died in office.)....But he does have white hair, scars from a bout with melanoma and limited flexibility from the injuries he sustained as a prisoner of war in Vietnam. And the fact remains that by the end of a second McCain term, he would be in his 80s.

Ineligible for Presidency?

The Times may still cry over false accusations that Obama isn’t an American citizen, but it also floated the smear that McCain was ineligible for the presidency because he was born in the Panama Canal Zone.

Warmonger?

Reporter Julie Bosman: “If Mr. McCain has developed a reputation as a warmonger, with his strong support of the Iraq war and his campaign-trail jokes about bombing Iran (to the tune of the Beach Boys song "Barbara Ann"), this advertisement is an effort to smooth over that perception.”

Liar?

Reporter Larry Rohter was McCain’s notoriously biased fact-checker during the 2008 campaign. Michael Cooper also regularly tarred McCain’s campaign claims against Obama as “false,” a bald word the paper rarely if ever used against Obama.

Racist?

Reporter Katharine Seelye: “If Mr. McCain wins Pennsylvania, it would keep him alive and scramble the picture for Mr. Obama. And it would lead to grave pronouncements about racism and the so-called Bradley effect of whites not being honest about their preferences to pollsters.”

After the Obama camp huffily accused McCain of playing the race card for ads likening Obama to a Hollywood celebrity [?], the paper turned the issue around and accused McCain campaign manager Rick Davis of injecting race into the race by fighting back against the charge:

With his rejoinder about playing "the race card," Mr. Davis effectively assured that race would once again become an unavoidable issue as voters face an election in which, for the first time, one of the major parties' nominees is African-American. And with its criticism, the McCain campaign was ensuring that Mr. Obama's race -- he is the son of a black man from Kenya and a white woman from Kansas -- would again be a factor in coverage of the presidential race....

The Times editorial board posted a ridiculous blog entry calling the ad a "racially tinged attack" on Obama:

The editorial board’s official editorial endorsement of Obama underlined the racist smear: “In the same time, Senator John McCain of Arizona has retreated farther and farther to the fringe of American politics, running a campaign on partisan division, class warfare and even hints of racism. His policies and worldview are mired in the past.

Affair with Lobbyist?

The Times got in trouble even among its liberal media colleagues with its purported bombshell about concerns by McCain’s Senate staff that he had been conducting an affair with lobbyist Vicki Iseman. But the unsubstantiated story fizzled and the paper ended up paying Iseman a settlement for suggesting her relationship with McCain was inappropriate.

McCain as P.O.W.

Reporter Elisabeth Bumiller wrote about McCain visiting New Orleans, site of the devastation of Hurricane Katrina: “Mr. McCain has seemed both moved and awkward this week, and at times defensive about his own more privileged past.”

Did her reckoning of McCain's "privileged past" included his five-and-a-half years in a P.O.W. camp in North Vietnam?

In fact, not even McCain’s years as a prisoner of war in Vietnam were off-limits, at least in the paper’s Sunday magazine, which printed a smear by left-wing author Gore Vidal accusing McCain of being a phony P.O.W.

Magazine writer Matt Bai tastelessly suggested McCain, as an isolated prisoner of war, had failed to learn the correct liberal lessons from Vietnam.