The chief complaint that critics make about the Clinton Foundation is that the former and perhaps future presidents engaged in a “pay-to-play” scheme, whereby donors—many of them foreign governments—would contribute money to the charity in exchange for access to Bill or Hillary Clinton, or worse, beneficial treatment from the State Department.

On Thursday, hacked emails from WikiLeaks suggest that is precisely what happened when the king of Morocco agreed to host a Clinton Global Initiative summit and give $12 million, but only if Hillary Clinton attended the May 2015 meeting.

“No matter what happens, she will be in Morocco hosting CGI on May 5-7, 2015,” Huma Abedin, a top Hillary Clinton aide, wrote in a November 2014 email to several other advisers, including campaign chairman John Podesta. “Her presence was a condition for the Moroccans to proceed so there is no going back on this.”

The timing of the summit was important because Hillary Clinton’s inner circle was planning for the formal launch of her presidential campaign and wanted to clear her schedule of paid speaking engagements and commitments to the foundation, particularly those that could cause political controversy. In January 2015, Abedin followed up with another email explaining in more detail why the future Democratic nominee couldn’t simply back out of the event in Morocco:

Just to give you some context, the condition upon which the Moroccans agreed to host the meeting was her participation. If hrc was not part if it, meeting was a non-starter. CGI also wasn't pushing for a meeting in Morocco and it wasn't their first choice. This was HRC's idea, our office approached the Moroccans and they 100 percent believe they are doing this at her request. The King has personally committed approx $12 million both for the endowment and to support the meeting. It will break a lot of china to back out now when we had so many opportunities to do it in the past few months.

And then, in what appears to be a rare venting of frustration by Abedin toward Hillary Clinton (at least in the thousands of hacked Podesta emails), she wrote this about her boss: “She created this mess and she knows it.”

Ultimately, Clinton’s aides prevailed upon her, and she sent Bill and Chelsea Clinton in her place. But this exchange about Morocco, first reported by The New York Post, is the clearest example yet in the emails posted by WikiLeaks of the type of arrangement that people find most, well, icky about the Clintons. Bill and Hillary wanted a deep-pocketed donor to make a large contribution and foot the bill for a ritzy conference, and the king of Morocco wanted access to the woman who, then as now, was the leading candidate to be the next president of the United States. The Clintons didn’t apparently care that, as the Post noted, Morocco had a spotty record on human rights. The State Department has cited the Moroccan government for widespread corruption, and the government-owned mining company that paid for the CGI meeting has been cited for its own human-rights abuses.

The Clinton campaign declined to comment specifically on the episode, instead delivering the blanket statement it issues on all WikiLeaks emails—blaming Russia for hacking Podesta’s emails and asking whether Donald Trump’s campaign was involved in the breach. Yet based on Hillary Clinton’s staunch defense of the foundation as “a world-renowned charity” at Wednesday night’s debate, she would likely argue that the money from Morocco went to a good cause; that stronger ties promote U.S. leverage; and that her record speaking out in support of human rights is well established.

All of that may be true, and nothing in the exchange appears to be illegal. Hillary Clinton wasn’t secretary of state at the time, and there is no evidence in the emails that Morocco gained any official concessions in terms of U.S. policy other than potentially the good will of the next president. But the image of the Clintons seeking out a foreign head of state for cash is not a good look. And as Abedin pointed out, Hillary Clinton “knows it.”

That is why the Moroccan episode is such a quintessentially Clinton controversy. It’s not as if they are tone-deaf politicians. Like so many other “scandals”—from the alleged renting out of the Lincoln bedroom in 1990s, to the pardon of Marc Rich, to Hillary’s use of a private email server—the Clintons seem to know that what they are doing will look bad and raise questions of ethics and corruption, and yet convinced of their own righteousness, they do it anyway. And the fact that these lapses continue to repeat themselves so long into their time in the public arena offers little hope that the next four years of a possible Clinton White House would be any different.