Only one year ago, adult-film actress Stormy Daniels had just begun a public fight to escape the constraints of an agreement she signed in October 2016 preventing her from discussing her relationship with President Trump. It was Daniels against an array of powerful people: The president of the United States, his pit bull personal attorney Michael Cohen, his personal legal team and, indirectly, the publisher of one of America’s best-known tabloid magazines.

Since then, the balance of power has shifted. Daniels’s representation of what happened and the context for it has been embraced by her former opponents save one: Trump himself.

This isn’t simply political scorekeeping. The timing of the agreement reached with Daniels has long raised the question of motivation: Was it an effort to bury her allegations about a one-night stand with the president in order to keep it from influencing the election? If so, Cohen’s involvement, as a representative of Trump and agent of the Trump campaign, would make the payment a violation of campaign finance law, according to experts who’ve spoken with The Post.

As of Monday morning, everyone involved in the payment except Trump now says that that’s exactly why the payment was made.

At the time, Daniels’s attorney was a man named Keith Davidson. According to a court filing from last August, someone working for Daniels contacted the parent company of the National Enquirer, American Media Inc., to see whether they’d be interested in buying Daniels’s story about her encounter with Trump in 2006. AMI’s CEO, David Pecker, and an editor contacted Cohen, with whom they had worked two months earlier to bury another such allegation involving a woman named Karen McDougal. Cohen contacted Davidson — who’d also represented McDougal.

The “Access Hollywood” tape had come out the day before the outreach to AMI. ABC News spoke with Davidson about the deal.

“The ‘Access Hollywood’ tape was the motivating factor in this case actually resolving,” Davidson says. “It defeats the argument that this was done for purely personal reasons, and that this was in fact done for political reasons. Because after the ‘Access Hollywood’ tape that something like this could be the straw that broke the camel’s back.”

“Do you think if Stormy Daniels and Karen McDougal were not silenced with hush payments, Donald Trump would have won the election?” he was later asked.

“I have no idea. I have no idea,” Davidson replied. Asked if that thought ever kept him up at night, he said, “A little bit, yes.”

The important part, though, is his assertion that the payment to Daniels “was in fact done for political reasons.”

Here’s the legal problem. Candidates are bound by limits on what they can raise to spend on their campaigns and where that money can come from. They also have to then report what was raised and spent. Those rules come with constraints on agreements they can make with outside parties; after all, if you could only raise money from particular people but you could also tell outside groups to spent $100 million targeting voters in Arizona, there wouldn’t be much point in having a fundraising limit.

Cohen made the payment of $130,000 to Daniels with his own money, making it, according to those involved, just such a workaround. The money was off the books but meant to influence the election. Ironically, had Trump simply paid the $130,000 himself and included it in the money he was giving to his own campaign and then reported the payment, there would have been no legal violation. But that isn’t what happened.

Last August, Cohen admitted guilt in two campaign finance violations related to the Daniels and McDougal payments. The Daniels payment resulted in a charge of making an excessive campaign contribution, since the $130,000 he spent was more than the $2,700 he was allowed to give to the campaign. The McDougal payment was slightly different: He admitted to causing an unlawful corporate contribution, because he’d worked to get AMI to buy her story and then never run it.

Cohen himself has repeatedly admitted guilt — and that the payment was campaign-related. He did so in court when offering his guilty pleas, twice stating under oath that he had acted “in coordination with, and at the direction of, a candidate for federal office ... to keep an individual with information that would be harmful to the candidate and to the campaign from publicly disclosing this information.”

There was only one candidate for whom he worked, but Cohen put a fine point on it during his congressional testimony last month.

“[L]ast fall I pled guilty in federal court to felonies for the benefit of, at the direction of and in coordination with Individual number one,” as court documents identified the candidate. “And for the record,” Cohen said, “individual number one is President Donald J. Trump.”

AMI is also on record as stating that the payment to McDougal was made in order to influence the election. In order to avoid criminal charges stemming from its role in the hush-money payments, it reached an agreement with federal prosecutors.

“As a part of the agreement, AMI admitted that it made the $150,000 payment in concert with a candidate’s presidential campaign, and to ensure that the woman did not publicize damaging allegations about the candidate before the 2016 presidential election,” read a news release from the U.S. Attorney for the Southern District of New York. “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.”

According to reporting from the Wall Street Journal (which first broke the Daniels story), AMI and Pecker later decided against seeking reimbursement for its payment to McDougal because attorneys indicated that it would further open them up to culpability for campaign finance violations. That repayment was the subject of an audio recording between Trump and Cohen in which, while discussing the campaign broadly, they agree that Trump should own the rights to McDougal’s story lest Pecker get “hit by a truck” and a new head at the National Enquirer decide to run the story.

The AMI agreement with the government even hints at a meeting in August 2015 during which Cohen and another campaign official were told that the company would help bury negative stories.

Daniels’s attorney, Michael Avenatti, told CBS News’s “60 Minutes” last year that the payment from Trump was meant to influence the election, an assertion that at the time put him and his client ahead of the curve in making that charge. Since, nearly every other party involved has concurred that the Daniels payment and the McDougal payment were meant to protect Trump’s election chances. Regardless of how you view Cohen’s credibility — last year, he admitted to lying under oath to Congress — defenders of Trump are left arguing either that he, Davidson and AMI are all lying, or that campaign finance laws don’t actually explicitly forbid the payments, a claim with which legal experts who’ve spoke with The Post disagree.

The alternative is that Trump is misrepresenting his role in the payments.