Former secretary of state Hillary Clinton speaks at a press conference announcing a new initiative between the Clinton Foundation, United Nations Foundation and Bloomberg Philanthropies in December 2014. (Andrew Burton/Getty Images)

The Clinton Foundation announced Thursday that it would no longer accept donations from corporations or foreign entities if Hillary Clinton is elected president.

The decision comes amid mounting criticism of how the foundation operated during her tenure as secretary of state, potentially allowing donors to seek special access through her government post.

Former president Bill Clinton also announced to staff Thursday that the final meeting of the Clinton Global Initiative would be held in September in New York City, regardless of the outcome of the election.

A spokesman for the foundation confirmed the decisions, which were first reported by the Associated Press.

The moves also come amid new allegations that foundation donors may have been given favored access while Hillary Clinton ran the State Department. Republican nominee Donald Trump has been highly critical of the foundation for accepting money from foreign governments — in particular Saudi Arabia, saying the contributions undermine Clinton’s record on women’s rights.

Former president Bill Clinton speaks to participants in the annual gathering of the Clinton Global Initiative America, which is a part of the Clinton Foundation, in Denver in 2015. (Brennan Linsley/AP)

CGI, launched in 2005, is an arm of the foundation that hosts gatherings bringing together government leaders, private companies and not-for-profit organizations to discuss ways to solve the world’s problems.

The initiative’s chief event is an annual meeting in New York City, tied to the United Nations General Assembly. The meetings provide networking opportunities for participants and a forum for private companies to make pledges to conduct charitable projects around the world, monitored by the Clinton Foundation.

The Clintons have long acknowledged that significant changes would need to be made to the foundation in the event that she is elected.

“There’ll clearly be some changes in what the Clinton Foundation does and how we do it, and we’ll just have to cross that bridge when we come to it,” Bill Clinton said at a CGI event in Atlanta in June.

According to a newly released batch of emails obtained by the conservative group Judicial Watch through a public records lawsuit, a foundation aide asked State Department staff to arrange a meeting on behalf of a foundation donor, a wealthy Ni­ger­ian businessman of Lebanese descent who had donated between $1 million and $5 million, according to disclosure reports.

The official said that he never connected with the businessman and denied that anyone had asked him to meet with the man.

Bill Clinton and his daughter, Chelsea, sit during their visit to the Ramotsa Clinic in Hammanskraal, near Pretoria in 2013. The former president was visiting Clinton Foundation projects in Malawi, Zambia, Tanzania, Rwanda and South Africa. (© Stringer . / Reuters/REUTERS)

Following the release last week, Trump accused Clinton of breaking the law and engaging in “pay to play” practices.

Trump and his family members have donated to the foundation in the past. When asked about it on the campaign trail, he has said that he regrets doing so, accusing the foundation of mismanaging its finances.

The Boston Globe’s editorial board called on the Clintons this week to shutter the foundation if she became president, saying it would pose an unacceptable conflict, given that some donors were foreign governments and corporations.

“The inherent conflict of interest was obvious when Hillary Clinton became secretary of state in 2009,” the Globe wrote. “She promised to maintain a separation between her official work and the foundation, but recently released emails written by staffers during her State Department tenure make clear that the supposed partition was far from impregnable.”

The sentiment was echoed by Clinton ally and former Pennsylvania governor Ed Rendell in a recent interview with the New York Daily News.

“It’d be impossible to keep the foundation open without at least the appearance of a problem,” Rendell said.

The foundation, which was renamed the Bill, Hillary and Chelsea Clinton Foundation after Hillary Clinton left the State Department, has operated since 1997 and expanded in subsequent years into an international charity. It has never previously restricted contributions from foreign citizens and companies or domestic corporations.

After Hillary Clinton launched her presidential campaign in 2015, she stepped down from the board, and the foundation promised to disclose its donors more frequently and limit foreign governments that could donate to a select list engaged in particular projects.

The foundation had also put in place certain restrictions on accepting donations from foreign governments while Clinton was secretary of state. It said it would seek State Department approval for any new foreign government donations or any substantial increase in donations from a preexisting government donor. But the rules did not prevent the foundation from accepting millions of dollars in foreign government donations while she was in office.

A 2015 Washington Post report also revealed a government donation that was not properly submitted to the State Department for approval.

According to a 2015 Post analysis of foundation donors, a third of contributors who had given more than $1 million were foreign governments or other entities based outside the United States.

Jose A. DelReal contributed to this report.