On President Trump’s 72nd birthday, the other shoe dropped in the long-standing inquiry into the foundation he operated before assuming the presidency. The New York attorney general’s office announced a lawsuit targeting Trump and his three oldest children, Donald Trump Jr., Ivanka Trump and Eric Trump. The allegation, in short, is that the foundation “operated in persistent violation of state and federal law governing New York State charities” for more than a decade.

Buried in the long lawsuit, though, is a fascinating look at how Trump allegedly tried to use the foundation — a charitable organization — to bolster his 2016 presidential bid. He had been leveraging the foundation to his personal benefit for some time, according to extensive reporting from The Washington Post’s David Fahrenthold. The extent to which he apparently deployed the charity to aid his campaign, though — and the extent to which his campaign team seemed to direct the work of the charity — is made very clear in the legal filing.

The whole thing started with a dispute between Trump and Fox News Channel.

A Republican presidential primary debate was scheduled for Jan. 28, 2016. The debate was going to be shown on Fox News and moderated by then-Fox host Megyn Kelly. Trump and Kelly were in a feud, originating with her pointed questions to him during the first debate the previous August and escalating as Trump disparaged Kelly in interviews and on Twitter.

In mid-January, he began toying on Twitter with the idea of skipping the debate, at one point even polling his followers for their thoughts.

As that poll was running, Fox put out a news release taunting Trump, a move that Trump later credited with cementing his decision not to participate. He went a step further, planning a competing television event at the same time: an event in Iowa — which was soon to hold its presidential caucuses — aimed at raising money for veterans. Trump was deliberate about his goal: trying to undercut viewership of the debate.

That’s where the foundation came in. From the attorney general’s lawsuit: “The Investigation revealed that the Iowa Fundraiser was planned, organized, financed, and directed by the Campaign, with administrative assistance from the Foundation.”

The ties to the campaign were apparently numerous: The deputy state director for the campaign was listed as the event organizer on a website created by the campaign’s digital media director, Brad Parscale. (Parscale is now the campaign manager for Trump’s reelection bid.) Speaker invitations were handled by Hope Hicks, then the campaign’s communications director.

The event, ostensibly meant to raise money for the foundation, used the campaign’s look, feel and slogan.

(Attorney general’s lawsuit)

About half the money that was raised went to the foundation — where campaign staff members took over, “dictat[ing] the manner in which the Foundation would disburse those proceeds, directing the timing, amounts and recipients of the grants,” the lawsuit alleges.

On Jan. 29, according to the lawsuit, Allen Weisselberg — the chief financial officer of the Trump Organization and the foundation’s treasurer — emailed then-campaign manager Corey Lewandowski to ask how to distribute the money raised. After a brief exchange, the lawsuit says, Lewandowski offered a strategy: Give out money in advance of the upcoming caucuses. The lawsuit quotes from an email that Lewandowski sent to Weisselberg: “Is there any way we can make some disbursements this week while in Iowa? Specifically on Saturday.” The caucuses were on the following Monday, Feb. 1.

The lawsuit says Weisselberg was provided with a list of charities by Lewandowski, a list that data within the document revealed had been edited by at least two other campaign staff members. Campbell Burr, assistant campaign manager, sent emails updating the campaign team on where the donations had gone, according to the lawsuit.

In the days leading up to the caucuses, Trump held several events in which he handed large ceremonial checks to Iowa veterans groups. As one photo included in the lawsuit shows, the checks contained both the name of the foundation and Trump’s campaign slogan. These events, like the one below on Jan. 31, were campaign events at which the checks were presented.

Arrows added by The Washington Post. (Attorney general’s lawsuit)

The lawsuit alleges that, in at least one instance, the foundation hadn’t yet even been informed that the group being presented with a ceremonial check was to receive any money.

On the day of the caucuses, Trump presented an actual check to the Mulberry Street Veterans Shelter in Cedar Rapids. The check came in a FedEx envelope from Lewandowski at the campaign, the lawsuit alleges.

At one rally on Jan. 31, Jerry Falwell Jr. praised Trump’s generosity.

“I mean, how often do you see a presidential candidate giving money away instead of taking it?” Falwell said. “I think that is wonderful.”

None of the money contributed to the foundation came from Trump, the lawsuit says.

After the caucuses were over — Trump came in second — The Post began investigating where the money raised at the rally had gone. The campaign scrambled to account for the rest of what had been raised.

On May 31, as Trump was publicly railing against The Post’s reporting, the campaign released a statement detailing what had been raised and where it went, including the contributions to and from the foundation. The campaign site also highlighted a Washington Times article headlined, “No ‘political stunt’: Donald Trump sets the record straight on his fundraising for military vets.”

In essence, the attorney general’s lawsuit alleges, the foundation made “an improper in-kind contribution of no less than $2.823 million (the amount donated to the Foundation) to the Campaign that provided Mr. Trump and the Campaign a means to take credit at campaign rallies, press briefings, and on the Internet, for gifts to veterans charities.”

The lawsuit notes that the foundation’s certificate of incorporation — signed by Trump — asserts that the foundation would not be used to the benefit of its directors or officers, a prohibition that includes the benefit of promoting his campaign. That certificate also barred intervening in “any political campaign on behalf of any candidate.” Trump himself signed annual financial filings reiterating that the foundation didn’t carry out political activity.

The 2016 filing explains the foundation’s interactions with the campaign in a footnote.

(Trump Foundation 2016 Form 990 filing.)

It will be hard for Trump to argue that he forgot about those limits. On March 22, 2016, the prohibition on using the foundation for political efforts was reiterated to the campaign after The Post reported on a contribution made from the foundation to a political group associated with Florida Attorney General Pam Bondi.

Two months later, the campaign was touting the contributions that followed the Iowa event.