Heidi M. Przybyla

USA TODAY

The Clinton Foundation announced that if Hillary Clinton is elected president, it will no longer accept foreign and corporate donations.

Scrutiny of the Democratic presidential nominee's relationship with her family’s charity is intensifying as Republicans charge that she gave its donors preferential treatment and access as secretary of State.

Bill Clinton also told staff members on Thursday that it will hold its final Clinton Global Initiative meeting in September in New York, which was first reported by the Associated Press.

Republican presidential nominee Donald Trump has been using the Foundation as an attack line, alleging Clinton engaged in "pay-to-play" practices, without providing specifics.

A conservative watchdog group recently released emails — obtained through a Freedom of Information Act request — showing contacts between foundation officials and Clinton’s State Department aides, including a foundation official who lobbied for a job for someone else in the State Department.

Clinton campaign spokesman Josh Schwerin has said the group, Judicial Watch, is a “right wing” organization trying to hurt Hillary Clinton’s presidential prospects and that there is no evidence she ever “took action as secretary of State because of donations to the Clinton Foundation.”

Nevertheless, if elected, the foundation will only accept contributions from U.S. citizens and independent charities. Bill Clinton will also decline any paid speeches, something he's done since November.

The decision also comes as Reuters reported that the foundation hired a cybersecurity firm to examine its data systems after detecting possible indications they’d been hacked.

Trump himself has contributed to the Foundation, a decision he's called a mistake in the course of his campaign.

The Boston Globe editorial board this week called on the Clintons to shut down the foundation entirely should she win the presidency, saying it poses an obvious conflict of interest. It also noted that, even though it is a charity, many donations come from overseas, including foreign governments "with troubling human rights records."

"As long as either of the Clintons is in public office, or actively seeking it, they should not operate a charity, too," the board wrote.