Washington loves a traitor, provided the betrayal is merely partisan and the party in question is Republican. Anyone who doubts this need only consider the current presidential contest.

Until last week, Sen. John McCain (R., Ariz.) seemed to have returned to the Republican fold. He campaigned for Bush in New Hampshire and then spoke up in support of the president when questions were raised about his National Guard service. It even seemed possible that McCain had left behind the bitterness of his defeat at Bush’s hands in the 2000 Republican presidential primaries.

Then McCain switched sides and came to John Kerry’s defense just at the moment the Bush campaign was starting to effectively raise questions about the Massachusetts senator’s credibility on national-security issues. Kerry was not, McCain announced, “weak on defense.” McCain had made himself the most valuable player of the Kerry rapid-response team by closing the national-security gap between the candidates.

A day or two later, McCain said he might entertain an offer to be Kerry’s running mate. He let the rumor simmer for a couple weeks before finally declaring, “I will not leave the Republican party — end of story.”

In fact, for all practical purposes, John McCain left the Republican party some time ago. He spent six years crafting and pushing through Congress a campaign-finance law that the House Republican leadership said would lead to an electoral Armageddon for the party. His efforts earned him the plaudits of the media whose support fueled his surprising run for the presidency. Thereafter, McCain endorsed Democratic positions on everything from global warming to health care. He even came out against tax cuts. As the New York Times editorial page put it, “bipartisan could mean ‘supported by the Democrats and John McCain.’ ”

Politicians become national figures in many ways. Some work hard in Congress, make a legislative reputation, and ascend in time to the leadership. Others raise money, put together a campaign organization, and run for the presidency. McCain has followed his own path to national prominence. He has cultivated the gatekeepers of modern politics: the media.

He has succeeded with his core constituency. Consider only the response to the Kerry defense. Both the Washington Post and the New York Times ran page-one stories highly favorable to the Arizona senator. The Times’s Todd Purdum discovered that McCain was “a straight shooter” in the estimation of his former press secretary. Of course, McCain had defended Kerry on two network morning shows, both eager to have him as a guest.

McCain has shrewdly built support among his media constituents. They see in McCain a “maverick” politician who bucked the system and his party to talk straight to the American people. He is for “the public interest” and against “the special interests,” a muckraker with power.

McCain also attends to the media’s material interests. His campaign-finance law protects the speech of people in the media while restricting advertising supported by citizens who do not work for newspapers or television. Consequently, the voices of the media will be much louder in the national debate than they were before McCain-Feingold.

In fact, McCain is a case of media failure. The media are rightly skeptical of most politicians. McCain is exempt from all doubts. Have you ever read a skeptical sentence about McCain in a major newspaper? Even a doubtful word? Is McCain so perfect a politician or are the media simply gullible?

Those who are more skeptical of McCain wonder why his political dictionary defines “bipartisanship” and “independence” as “supports the liberal, Democratic position.” We question whether his attacks on Bush owe more to personal pique and electoral failure than to political principle. We wonder why he must turn every political disagreement into a struggle between the pure and the corrupt, between the evil ones and John McCain. We doubt that his demagoguery, libels, and bitter personal denunciations serve American democracy well.

Why did McCain turn on Bush and defend Kerry? Friendship no doubt mattered. Perhaps ambition called: McCain might like to be secretary of defense in a Kerry administration. Beyond all that, the knife in Bush’s back brought McCain back into the national spotlight. He was practicing the politics he has perfected in recent years: the politics of the prima donna.