President Donald Trump is said to have known about sexual-misconduct allegations against Eric Schneiderman, the disgraced former New York attorney general, back in 2013.

That information has come to light as part of the federal investigation into Michael Cohen, Trump's longtime lawyer.

It could help explain a cryptic 2013 Trump tweet.

An attorney said in a federal court filing on Friday that President Donald Trump knew of allegations of sexual misconduct against Eric Schneiderman, the disgraced former New York attorney general, in 2013.

The allegation from the attorney, Peter Gleason, has come to light as part of the case against Michael Cohen, Trump's longtime lawyer.

In a letter to US District Judge Kimba Wood, Gleason requested a protective order on any records seized in the FBI's raids of Cohen's properties last month that had to do with Gleason's discussions with Cohen about two women who say they were abused by Schneiderman.

Four women who were romantically involved with Schneiderman accused him of abuse in a New Yorker report published Monday evening. Schneiderman denied the allegations and resigned hours after the story broke.

Gleason wrote that his office was contacted "some years ago" by two unrelated women who said Schneiderman was "sexually inappropriate" with them. Gleason said he advised one woman who came forward in 2013 against reporting the incident to the Manhattan District Attorney's Office because such claims were routinely ignored.

Gleason said he discussed the matter with Steve Dunleavy, a retired New York Post columnist, who then did so with Trump — something Gleason says he found out while talking with Cohen.

"During my communications with Mr. Cohen I shared with him certain details of Schneiderman's vile attacks on these two women," Gleason wrote. "The extent of Mr. Cohen memorializing any of our communications is unknown. However, these two women's confidentiality, as victims of a sexual assault, should be superior to that of any unrelated subpoena."

Gleason's information could help explain a cryptic September 2013 tweet from Trump about Schneiderman, the former New York Rep. Anthony Weiner, and former Gov. Eliot Spitzer.

"Weiner is gone, Spitzer is gone — next will be lightweight A.G. Eric Schneiderman," Trump tweeted. "Is he a crook? Wait and see, worse than Spitzer or Weiner."

At the time, Schneiderman was investigating Trump's defunct real-estate-education venture, Trump University, and Trump was hammering Schneiderman in the press and on Twitter over the inquiry.

After he was elected president, Trump settled the Trump University litigation. Last month, the $25 million settlement was finalized for the students who said they were defrauded by the school.

Cohen did not immediately return a request for comment from Business Insider. He is the focus of a criminal investigation in the Southern District of New York into whether he violated campaign-finance laws or committed bank fraud.

The documents obtained in the raids are being reviewed to determine what falls under attorney-client privilege and what prosecutors can use going forward. That process is being overseen by Barbara Jones, the special master appointed by Wood late last month.