Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

National Enquirer, the staple of the supermarket checkout stand, had a tough 2018. Its parent company, American Media Inc., was pinched by growing debt and declining readership. The close relationship between the company’s CEO and President Donald Trump led to a federal investigation into the magazine's dealings with Michael Cohen, Trump’s former lawyer and fixer.

But with the magazine’s latest scoop on the marital life of Amazon CEO Jeff Bezos and an announcement from American Media that it raised $460 million to refinance its debt, the publication has suddenly regained its footing in the world of celebrity gossip.

On Wednesday morning, Bezos tweeted that he and his wife, MacKenzie, were divorcing. That news spawned a host of stories about what Bezos’ divorce meant for the future of Amazon, but the bigger news was yet to come.

Just hours after the tweet, National Enquirer posted a short story on its website that Bezos had been in a relationship with another woman, Lauren Sanchez, the estranged wife of Patrick Whitesell, executive chairman of Endeavor, a powerful talent and media agency. But National Enquirer saved much of the story for its print edition, an unusual move in the era of digital news dissemination.

Sanchez has not commented publicly on the story.

Since the regular weekly edition had just been delivered to newsstands, National Enquirer rushed out a special edition with lurid new details and photos that hit newsstands on Thursday morning. It was sold out at three locations in midtown Manhattan by lunch time. Not since the paper exposed golfer Tiger Woods’ affair in 2009 has National Enquirer driven the news cycle as it did on the Bezos story.

“This will sell-out. It will jump off the newsstand,” said Stu Zakim, former senior vice president of communications for National Enquirer. “Mainstream news organizations may not change their minds about the Enquirer, but you can’t argue with good reporting.”

A spokesperson for National Enquirer said the magazine spent four months following Bezos and that the story “underscores the kind of investigative reporting that the publication has long been known for.”

Byers Market Newsletter Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

The Bezos story is a significant boost for a magazine that has struggled in a digital age where it competes with dozens of internet-based celebrity gossip websites. According to the latest data from the web measurement firm Comscore, November web traffic for National Enquirer's website was down 21 percent over the same month last year, with the site attracting just 466,000 unique visitors. Mailonline.com, which also centers its reporting on celebrities, attracted 65 million unique users in November, a 23 percent jump.

Samir Husni, the director of the magazine innovation center at the University of Mississippi, said that modern celebrity journalism is a challenging industry given that stars can choose to reveal their news on social media.

A big scoop, however, can still make a difference.

“It’s a juicy story,” Husni said. “And even if you don’t know who Jeff Bezos is, you want to know who he is. Anytime there’s a hero and villain, it drives people's attention.”

The Bezos story has put National Enquirer back in the media conversation, but what happened behind the scenes may prove to be more important for the magazine’s long-term survival. The magazine’s owner said in a news release on Wednesday it had raised $460 million and refinanced its debt. The company declined to share the companies or individuals that provided the funding.

Debt refinancing had been far from a sure thing after David Pecker, American Media’s chairman and chief executive, was implicated in a scheme to pay for stories about Trump during the then-candidate’s 2016 election campaign in order to keep them from the public — a practice known as “catch and kill.” Pecker was previously considered a close friend of Trump.

Pecker was granted immunity in exchange for information about his involvement with Cohen, Trump’s former lawyer who has since pleaded guilty to violating campaign finance laws and implicated the president in some of his crimes.

“Completing this latest refinancing, in one of the most challenging market conditions in recent history, underscores the confidence the investment community has in American Media and our powerful brands,” Pecker said in the release.

Pecker’s relationship with Trump added another layer of intrigue to National Enquirer’s Bezos story.

The Washington Post, owned by Bezos, has been a vocal critic of the administration, prompting frequent criticism by Trump of the paper, Amazon and Bezos. Trump tweeted in 2017 that “Amazon is doing great damage to tax paying retailers.” On Thursday Trump commented on Bezos’ impending divorce, saying, “it’s going to be a beauty.”

A source at National Enquirer who was familiar with the Bezos story but not authorized to speak publicly told NBC News that neither Amazon nor Endeavor had put any pressure on the paper to stop publication of the story.

Through a lawyer, Bezos told National Enquirer that he “supports journalistic efforts and does not intend to discourage reporting about him.”

While there is no evidence Trump suggested the story, Zakim, the former National Enquirer spokesperson, said internal politics were still at play.

“If Bezos was a Trump friend, they wouldn’t be doing this story,” Zakim said.