A top election official issued a statement Thursday on campaigns accepting foreign aid the day after President Donald Trump said he'd consider taking information on opponents from other countries.

Trump told ABC's George Stephanopoulos in an interview excerpt aired Wednesday he thinks he'd "take it" if a foreign government came to him and offered dirt on an opponent. The comment arose while the men were discussing why the president's son, Donald Trump Jr., didn't go to the FBI after he spoke with a Russian lawyer at Trump Tower during the 2016 presidential election.

Federal Election Commission Chair Ellen Weintraub spoke out on the issue in a statement released on Twitter to make it "100% clear to the American public" that accepting such an offer is illegal.

"This is not a novel concept," Weintraub said. "Electoral intervention from foreign governments has been unacceptable since the beginnings of our nation."

View this graphic on nbcnews.com

Weintraub's statement went on to say that anyone accepting foreign assistance risks a federal investigation and should report any offer to authorities.

Trump resisted the idea that any candidate would report an offer of "oppo research" to the FBI and told Stephanopoulos "life doesn't work that way."

"If I thought there was something wrong, I’d go maybe to the FBI," Trump said.

Stephanopoulos then pointed out that FBI Director Christopher Wray said his agency should know about contacts from foreign governments.

"The FBI director is wrong," Trump said.

Trump was at the center of a federal investigation into Russian election meddling and possible obstruction conducted by special counsel Robert Mueller. The 448-page report, released in April, avoided making a decision on obstruction, but Mueller did conclude that there was Russian interference in the 2016 election.

House Intelligence Chairman Adam Schiff, D-Calif., said Thursday in response to Trump's comments that the president "has either learned nothing from the last two years or picked up exactly the wrong lesson."

"The message that he seems to be sending now is, as long as a foreign power wants to help his campaign, they can count on him having the good discretion not to alert his own FBI about it," Schiff said. "And that's just dangerous, appalling, unethical, unpatriotic, you name it."

Trump claimed Thursday that his "full answer" to Stephanopoulos' question wasn't aired in a series of tweets where he boasted about meeting with European leaders.

"Should I call the FBI about these calls and meetings?" Trump wrote. "How ridiculous! I would never be trusted again."

Trump, in an earlier version of the tweet, referred to Prince Charles as the "prince of whales," but deleted it minutes later.

Speaker Nancy Pelosi blasted Trump on Thursday and said that his remarks to Stephanopoulos showed "once again that he doesn’t know right from wrong."

“That’s probably the nicest thing that I can say about him, because if he doesn’t know the difference, it might explain some of his ridiculous behavior,” Pelosi said. “There is no ethical sense that informs his comments and his thinking.”