The media company that owns the National Enquirer admitted to "working in concert" with the Trump campaign to pay off a woman who said she had an affair with Mr. Trump in order to squash her story, prosecutors in New York said Wednesday.

The U.S. Attorney's Office for the Southern District of New York said it had agreed not to prosecute American Media, Inc. (AMI), the Enquirer's parent company, for its involvement in the scheme in exchange for the company's cooperation in the investigation into the payment to Karen McDougal, a former Playboy model.

AMI "admitted that its principal purpose in making the payment was to suppress the woman's story so as to prevent it from influencing the election," the office said.

Get Breaking News Delivered to Your Inbox Click here to view related media. click to expand

The announcement came hours after former Trump attorney Michael Cohen was sentenced in Manhattan to three years in federal prison for violating campaign finance laws for his role in paying off McDougal and Stormy Daniels.

Prosecutors did not say when they reached the agreement not to prosecute AMI for the payment to McDougal, which came in the weeks before the 2016 election. The office said in a press release the company "admitted that it made the $150,000 payment ... in order to ensure that the woman did not publicize damaging allegations about the candidate."

"AMI further admitted that its principal purpose in making the payment was to suppress the woman's story so as to prevent it from influencing the election," the news release said.

In exchange for avoiding prosecution, AMI accepted responsibility, agreed to assist in the investigation, and improve its internal compliance related to campaign finance laws, the U.S. Attorney's Office said.