Federal prosecutors in New York have gathered evidence that shows President Donald Trump participated in so-called hush money payments made to women who claimed to have had sexual encounters with him before his presidency, according to The Wall Street Journal.

Citing a slew of unidentified sources, the newspaper reported that Trump "intervened directly to suppress stories about his alleged sexual encounters with women," coordinating with American Media Inc.'s chief executive, David Pecker. American Media publishes the National Enquirer.

The Journal reported the coordination might have violated campaign-finance laws.

Karen McDougal, a former Playboy Playmate, claimed she had a nearly year-long affair with Trump in 2006 and 2007. The rights to her story were bought in August 2016 by American Media, the Journal reported, but her story was never published.

Adult film star Stormy Daniels also said she had a sexual encounter with Trump in 2006. She signed a non-disclosure agreement shortly before voters went to the polls for the 2016 presidential election in exchange for $130,000 from Trump’s former attorney, Michael Cohen.

Cohen pleaded guilty in August to multiple counts of tax evasion and a campaign finance violation related to payments to Daniels and McDougal. In court, Cohen said he paid a pair of women in coordination with an "unnamed candidate" to influence the election. Neither the president nor the women were named, though The Associated Press reported that the amounts of money paid and the dates of the transactions lined up with payments made to Daniels and McDougal.

In court records, prosecutors said Cohen planned to buy the rights to McDougal’s story from American Media Inc. for $125,000, but the media company backed out of the deal before it could be finalized.

The Journal reported that Trump contacted Pecker directly when he learned in mid-2016 that McDougal was considering selling her story. American Media decided to buy it for $150,000 after learning that she was also in talks with ABC News, according to the newspaper.

The deal signed by McDougal included promises that she would appear as a model on two magazine covers and that American Media could publish health and fitness columns under her name, the Journal reported. The newspaper added that Pecker consulted with an election-law specialist before signing the deal to ensure that the payment would be justified for business and not amount to an illegal campaign contribution.

Under federal law, corporations are not allowed to give cash or in-kind contributions directly to candidates.

After the deal was signed, Cohen became concerned that Pecker might leave American Media and hatched a plan to buy all materials related to Trump that had been collected by the company over the years, according to the Journal.

The New York Times reported in August that, before the 2016 presidential election, Trump and Cohen discussed buying "all the dirt on Mr. Trump that the National Enquirer and its parent company had collected on him, dating back to the 1980s." The deal, which encompassed older stories from the tabloid and lists of sensitive sources and tips, among other things, was never finalized, the Times reported.

Trump and Cohen discussed the possibility of buying McDougal's story and the rest of the materials collected by American Media in a recording seized by authorities in April, during a raid on Cohen's office, according to the Journal. The recording was made in September 2016, two months before that year's presidential election, CNN reported.

"I need to open up a company for the transfer of all that info regarding our friend, David," Cohen can be heard saying in the tape. CNN reported that the David that Cohen referred to was most likely Pecker.

A few months later, after audio of Trump speaking on a hot mic on the set of "Access Hollywood" in 2005 surfaced, Cohen asked American Media to buy Daniels' story, according to the Journal. However, Pecker declined because "he didn't want his company to pay a porn star," the newspaper reported.

When Trump learned Pecker wouldn't buy Daniels's story, he told Cohen to "get it done," according to the Journal. The newspaper cited Cohen's account to prosecutors.

Within days, Cohen and Daniels's attorney had negotiated a non-disclosure agreement for Daniels, the Journal reported.

Trump has denied that he had affairs with either Daniels or McDougal. After Cohen pleaded guilty in August, the president accused his ex-attorney of “(making) up stories in order to get a ‘deal’” and praised his former campaign manager, Paul Manafort, for refusing to “’break’” in a separate case stemming from special counsel Robert Mueller’s investigation into Russian election meddling.