The Clinton Foundation was on the defensive Wednesday after disclosing that it had accepted millions of dollars from several foreign governments while Hillary Clinton was secretary of state, including one donation that violated the foundation's ethics agreement with the Obama administration.

Most of the contributions -- which had not previously been detailed by the foundation -- were possible due to exceptions written into the organization's 2008 agreement with the White House that limited donations from foreign governments, according to The Washington Post, which first reported the contributions. 

But foundation officials acknowledged that they should have sought approval from the State Department's ethics office in one instance. In a statement to Fox News, the foundation said it had received an unsolicited donation of $500,000 to its Haiti earthquake relief fund from the Algerian government in 2010. 

"As the Clinton Foundation did with all donations it received for earthquake relief, the entire amount of Algeria's contribution was distributed as aid in Haiti," the foundation's statement read, in part. "This donation was disclosed publicly on our website, however, the State Department should have also been formally informed. This was a one-time, specific donation to help Haiti and Algeria had not donated to the Clinton Foundation before and has not since."

The statement did not make clear when foundation officials found out that the donation violated the ethics agreement or why the foundation did not alert the State Department at the time. 

More On This...

At the time of the contribution, Algeria, which has sought a closer relationship with Washington, was spending heavily to lobby the State Department on human rights issues.

The revelation that foreign countries with interests before the U.S. government were allowed to donate millions of dollars to the foundation could raise questions about Clinton's impartiality while serving as secretary of state from 2009 to 2013. Earlier disclosures made on the foundation's website have revealed an increase in donations by foreign governments since Clinton left the State Department in 2013. 

The Post reported that rarely, if ever, has a potential presidential candidate been so closely associated with an organization that has solicited financial support from overseas. Clinton is widely expected to declare her candidacy for the 2016 Democratic presidential nomination sometime in the coming months.

Fox News' John Roberts contributed to this report.

Click for more from The Washington Post.