Top Hillary Clinton aide Huma Abedin acknowledged that Clinton solicited a $12 million donation from the Moroccan government for her family foundation even though she knew it would cause problems for her presidential campaign, according to emails released Thursday by WikiLeaks.

Abedin wrote in January 2015 to campaign manager Robby Mook and campaign chairman John Podesta that Clinton recognized the harm the donation could cause her White House bid, adding that Clinton "created this mess and she knows it."

King Mohammed VI of Morocco had agreed to donate $12 million to the Clinton Foundation if the organization held a convention in his country in May 2015, with Clinton serving as the keynote speaker. The event was slated to be held just a month after Clinton announced her presidential run. Abedin's email shows that Clinton understood how the exchange would look to the public, the New York Post reported.

"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," Abedin wrote in a January 2015 ­email to Mook and campaign chairman John ­Podesta. "CGI [Clinton Global Initiative] 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 [foundation's] endowment and to support the meeting," Abedin continued. "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. She created this mess and she knows it."

The Clinton Foundation agreed to host the event in Morocco even though the State Department described the Moroccan government as corrupt. The Robert F. Kennedy Center for Justice has accused a Moroccan government-owned mining company, OCP, of serious human rights violations, the Post noted.

Clinton herself did not end up appearing at the convention, the Clinton Global Initiative summit, and instead sent Bill and Chelsea Clinton to speak on her behalf.

Thursday's batch of released emails came from John Podesta's hacked account. The U.S. government has formally accused Russia of hacking American political networks to influence the 2016 election.