The Donald J. Trump Foundation has been ordered to stop collecting charitable contributions in New York in the wake of allegations that the foundation illegally solicited donations and misused funds.

>> Read more trending stories

The New York Attorney General's Office wrote in a letter dated Sept. 30 that the state's charities bureau determined that the Trump Foundation raised funds in New York this year without registering, as required by state law.

James Sheehan, chief of the charities bureau, wrote: "The Trump Foundation must immediately cease soliciting contributions or engaging in any other fundraising activities in New York."

Authorities ordered foundation officials to file paperwork with the state, including an independently certified annual financial statement, which is required from every charity registered with the bureau.

Failure to either stop fundraising efforts or to answer the state's request for financial reports with 15 days "shall be deemed a continuing fraud upon the people of the state of New York."

The Trump campaign quickly issued a statement in response in which it implied that Attorney General Eric Schneiderman ordered the end of fundraising activities for political reasons.

"While we remain very concerned about the political motives behind Schneiderman's investigation, the Trump Foundation nevertheless intends to cooperate fully with the investigation," spokeswoman Hope Hicks said in a statement released to NBC News. "Because this is an ongoing legal matter, the Trump Foundation will not comment further at this time."

The "notice of violation" was sent to the Trump Foundation in the wake of allegations that charity funds were wrongfully used by Republican presidential nominee Donald Trump to settle lawsuits filed against his various businesses.

A Washington Post investigation last month found evidence that Trump used $258,000 in charitable donations to settle lawsuits related to his Mar-a-Lago Club in Palm Beach, Florida, and his golf courses in New York.

The New York Attorney General's Office is investigating the allegations.