David Pecker and President Trump. (Marion Curtis/Reuters; John Minchillo/AP)
Media columnist

Only a tiny handful of the nation’s newspapers endorsed Donald Trump for president. Among them: the National Enquirer, the supermarket tabloid famous for trashing Hillary Clinton and spreading the lie that former president Barack Obama was not born in the United States.

As the 2016 election neared, America’s grocery shoppers were treated to anti-Clinton headlines the size of impulse-buy Hershey’s bars. One, from November 2016, shouted: “Hillary: Corrupt! Racist! Criminal!”

For Trump the candidate, there could be no better media friend than David Pecker, chairman of the paper’s parent company, American Media.

And the feeling was mutual: Trump often said that he thought the Enquirer deserved journalism’s highest honor, the Pulitzer Prize — something about as likely as Bill O’Reilly winning the Nobel Prize for literature.

Like so much else in Trump World, that cozy relationship imploded last week as federal prosecutors gave Pecker legal immunity in exchange for his cooperation in their investigation of Trump’s former lawyer and fixer, Michael Cohen.

Or, to use words better suited to a tabloid headline: Pecker flipped.

For months and years, the Enquirer’s pro-Trump articles and endorsement were obvious to all.

But now we know more of the ugliness that lurked behind the headlines.

We know about a practice called “catch and kill” that buried stories before they could damage Trump.

We know about a safe that held the Enquirer’s secret documents detailing how silence was bought, and for what price.

As the Wall Street Journal first reported before the 2016 election, these included a story about former Playboy model Karen McDougal, detailing what she says was an affair with Trump, which Cohen worked to conceal. (Cohen pleaded guilty last week to campaign finance violations, alleging that he, Trump and the Enquirer were involved in hush-money payments to porn actress Stormy Daniels, as well as McDougal.)

We also know that the Enquirer bought the catch-and-kill rights to a story from a former Trump Tower doorman who claims knowledge of another Trump affair with an ex-housekeeper in the 1980s. (Trump has denied the affair with McDougal; an April New Yorker article on the doorman’s story could find no corroboration and included a full round of denials.)

Whatever the truth of the various claims and counterclaims, we have here a classic case of sleaze meets sleaze.

Trumpian lies and payoffs are perfectly paired with the Enquirer’s betrayal of journalistic purpose and standards.

Granted, no one ever confused the National Enquirer with the Times of London, but it once had a reputation as a scrappy gossip sheet whose offerings — however lowbrow — were essentially factual. Most notable, perhaps, it broke the story that former North Carolina senator John Edwards had an affair and fathered a child while his wife, Elizabeth, was dying of cancer; the revelations derailed Edwards’s presidential ambitions.

After Pecker’s arrival at AMI in the 1990s, his relationship with Trump grew ever stronger, and by 2010 the Enquirer was pushing its readers to a pro-Trump website set up by Cohen.

“I think David Pecker fancied himself Donald Trump’s sidekick,” a former Enquirer editor, Jerry George, told HuffPost.

“They were brothers of a sort. . . . the social underdogs that just missed the mark as far as society went.”

But, as Cain and Abel knew, brother can turn on brother.

There is, of course, much more to learn about the nasty business of Trump and the Enquirer. And there are still plenty of unanswered questions.

What, precisely, did Pecker get from Trump in return for all the lavishly rendered favors — what was the full nature of the quid pro quo?

What else was in that safe — might it turn out to be a kind of secret history of the United States (or at least of its celebrity class), picking up where J. Edgar Hoover’s private files left off?

And to what extent does the National Enquirer deserve the concern of free-press advocates, who reasonably worry about a publisher — even an unsavory one — cooperating with a criminal investigation, and perhaps doing so under pressure?

Such concerns may be invalidated by the Enquirer’s formal agreement to be reimbursed by Trump’s fixer, with the intention of affecting the election. The company functioned more as political apparatus than as news organization.

Those circumstances, ProPublica president Richard Tofel told me, “surrender any pretense that you are acting as journalists.”

Much remains murky — but not everything.

What’s clear here is a particularly sordid kind of poetic justice.

The National Enquirer, under David Pecker, did everything it could to put Donald Trump in the White House.

And it is now inseparable from the legal and political troubles that may send him packing.

For more by Margaret Sullivan, visit wapo.st/sullivan.