American Media Inc. will sell the National Enquirer to the CEO of Hudson News. (Scott Olson/Getty Images)

American Media Inc. is selling the National Enquirer for $100 million to James Cohen, CEO of Hudson News, ending an association between a longtime friend of President Trump and the tabloid that illegally attempted to bury embarrassing news about Trump during the 2016 campaign.

The supermarket tabloid, along with two sister publications, is set to be purchased by the head of the travel retailer known for its airport newsstands.

The decision to sell came after Anthony Melchiorre, the hedge-fund manager whose firm controls AMI, became disillusioned with the reporting tactics of the Enquirer and the legal and political pressure that resulted from them, according to people familiar with the deliberations.

The Enquirer is overseen by AMI President and CEO David Pecker, Trump’s confidant dating back many years, whose efforts to tilt the 2016 presidential election have been the subject of news stories for much of Trump’s presidency.

Pecker and his supermarket tabloid have also been embroiled in recent months in an unusually public feud with Amazon founder and CEO Jeff Bezos, who owns The Washington Post.

The sale of AMI’s tabloid business, which includes the National Examiner and the Globe, is expected to reduce AMI’s debt to $355 million, the company said.

AMI faced financial difficulty as it sought to refinance more than $400 million in debt and the Enquirer’s circulation continued to decline. The paper sold an average of 516,000 copies per issue as recently as 2014, but that number fell to 218,000 in December, according to data compiled by the Alliance for Audited Media.

The sale price of $100 million is a stunning figure for a scandal-ridden tabloid. The New York Times Co. sold the Boston Globe for $70 million in 2013. Bezos paid $250 million for The Post that same year.

The sale to Cohen, whose father founded Hudson News, also includes a service contract under which AMI will provide publishing, financial and distribution assistance to the tabloids included in the purchase. Employees of the publication were told Thursday that they were not moving from their current downtown Manhattan office location, according to people familiar with the discussions.

Dylan Howard, the chief content officer of AMI, will remain at the company, those people said.

In addition to its shaky finances, AMI faced significant legal risk owing to the efforts of Pecker and Howard and their “catch-and-kill” actions during the 2016 presidential campaign.

Pecker and Howard entered into non-prosecution agreements with federal investigators to avoid indictments for their role in buying and then burying the story of a former Playboy model who alleged having an affair with Trump.

In August, just as the two men were finalizing those agreements, the company’s board of directors started looking for ways to unload the tabloid business “because they didn’t want to deal with hassles like this anymore,” said a person familiar with the board’s deliberations.

As part of that agreement, the company admitted to making the hush-money payments to “influence the election.” Also as part of the arrangement, the company said it would not commit any crime for three years. Doing so could result in “prosecution for any federal criminal violation of which this office has knowledge,” according to the agreement.

The Enquirer’s reporting on Bezos’s extramarital affair led to Bezos accusing the Enquirer of an attempt to extort him. Prosecutors are now investigating those claims, which put the Enquirer and its top officers in a position of potentially violating their agreements.

“The sale of these brands shows their vitality in today’s newsstand marketplace where they continue to generate nearly $30 million in profit annually,” Pecker said in a statement. “James and his team at Hudson have a proven history in publishing and have the market-based knowledge and long-term vision needed to ensure the growth of these brands.”

In announcing the deal, Cohen said he planned to utilize the Enquirer’s archive in documentaries and podcasts.