(CNN) David Pecker, the head of the company that publishes the National Enquirer, has spoken with prosecutors with the New York district attorney's office as part of its investigation into the Trump Organization's handling of hush money payments to women who alleged affairs with President Donald Trump, sources with knowledge of the meeting tell CNN.

The America Media Inc. chairman's late October meeting with prosecutors from the major economic crimes bureau could provide key details on discussions that took place involving Stormy Daniels, the adult film star who allegedly had an affair with Trump, and agreements that were made with former Trump lawyer Michael Cohen, the sources said.

Cohen is cooperating with the investigation. Pecker is expected to continue talking with prosecutors, sources said.

The meeting between Pecker and the local prosecutors shows that investigators are still trying to connect the dots between Trump and the hush money payments. The meeting could result in Pecker being a potential critical witness down the road in any legal action against Trump or the Trump Organization.

Prosecutors are investigating whether any state laws were broken, such as whether the Trump Organization falsified any business records relating to the Daniels payment.

The DA's investigation is continuing as its effort to subpoena the President's accounting firm Mazars USA for business and personal tax returns makes it way to the US Supreme Court.

A US appeals court ruled last month that presidential immunity doesn't bar a third party, such as Mazars, from responding to a state grand jury subpoena even if it involves the President. Trump's attorneys have asked the Supreme Court to take up the case but the court has not yet decided whether it will hear arguments.

AMI did not immediately respond to a request for comment. A lawyer for Pecker and New York DA's office both declined to comment.

Prosecutors have interviewed Cohen at least three times at the Otisville Correctional facility where he is serving a three-year federal prison sentence for multiple crimes, including facilitating the hush money payments, according to sources. Cohen, who pleaded guilty to federal campaign finance charges, began cooperating with the state investigation soon after it was launched this summer.

AMI, the parent company of the Enquirer, came under fire after it was revealed the tabloid purchased the rights to negative stories about Trump before the election and buried them. Pecker and Trump's relationship dates back years but prosecutors are focusing on the year leading up to the presidential election when the magazine publisher discussed how he could help the candidate.

Soon after Trump declared his candidacy, Pecker met with Cohen and at least one other member of the campaign in August 2015 to discuss identifying stories that may be damaging to candidate Trump, according to a non-prosecution agreement AMI signed with federal prosecutors in New York. AMI and its executives Pecker and Dylan Howard reached non-prosecution agreements and testified with immunity before the federal grand jury. It isn't clear what arrangement Pecker has with the New York DA's office, but under certain non-prosecution agreements the obligation can continue to other investigations.

In October 2016, an agent for Daniels contacted the company and said she was willing to go public with her allegations of an affair with Trump, according to court filings from Cohen's plea agreement. Pecker then contacted Cohen, who in turn negotiated with Daniels' attorney to "purchase [her] silence" for $130,000, according to the filings.

With fewer than two weeks to go before the election, Cohen had failed to either execute the agreement immediately or pay Daniels so she threatened to take her story to another publication. Pecker then informed Cohen, in part by calling him on an encrypted phone app. He told Cohen that the deal needed to be completed "or it could look awfully bad for everyone," according to court filings. Cohen then agreed to make the payment and finalize the deal.

JUST WATCHED National Enquirer boss granted immunity Replay More Videos ... MUST WATCH National Enquirer boss granted immunity 03:00

After Cohen made the $130,000 payment to Daniels, he was reimbursed, prosecutors said in court filings, by the Trump Organization. The company's executives authorized payments to him totaling $420,000, in an effort to cover his original payment and tax liabilities, and reward him with a bonus, according to prosecutors, and they falsely recorded those payments as legal expenses in their books.

AMI also worked to bury another negative story. In August 2016, AMI paid Karen McDougal, a former Playboy model who alleged an affair with Trump a decade ago, $150,000 to buy the rights to her story about the alleged affair. In exchange, McDougal was featured on the cover of certain magazines and AMI published her articles but AMI never published her tell all.

Trump has denied both affairs.

Cohen, then an attorney for the Trump Organization, was in touch with Pecker over the next few weeks. They discussed the possibility of Cohen acquiring the rights to the McDougal story from AMI for $125,000, according to the non-prosecution agreement. An invoice was written to identify the payment as a "flat fee for advisory services," according to the deal with prosecutors. Cohen never did buy the rights, but he discussed it during a recorded conversation with Trump ahead of the election.

In the recorded call Cohen told Trump about his plans to set up a company to finance the purchase of the rights from American Media.

"I need to open up a company for the transfer of all of that info regarding our friend David," Cohen said in the recording, a reference to Pecker.

No payment was ever made from Trump, according to Rudy Giuliani, the President's attorney.

On the tape Cohen also explains how they would have arranged the deal. He tells Trump, "I've spoken with (Trump Organization chief financial officer) Allen Weisselberg about how to set the whole thing up with funding."

When CNN first reported on the recorded call, Trump Organization attorney Alan Futerfas declined to answer whether the payment would have been from the company or from Trump's personal finances. He said Weisselberg wore two hats working for Trump and his company. "I don't even know what Michael Cohen would have said to Allen Weisselberg because all Allen does is bookkeeping and process requests for transactions that are given to him," Futerfas said.

During a meeting last month with prosecutors, Cohen and investigators focused on the role of Weisselberg, according to one source familiar with the meeting.

Earlier this year when Cohen testified before Congress he held up a check dated from August 2017 and signed by Trump for $35,000, which Cohen said showed the President personally reimbursed him for the "cover-up." He also provided lawmakers with a check signed by Donald Trump Jr. and Weisselberg "to reimburse me for the hush money payments."