ALBANY — President Donald Trump and his lawyer Michael Cohen knew of sexual misconduct allegations against former state Attorney General Eric Schneiderman in 2013, according to a letter filed in U.S. District Court in Manhattan on Friday by a Putnam County attorney.

The attorney, Peter Gleason of Mahopac, claims that two women had approached him — independently of one another and about a year apart — claiming that Schneiderman had been "sexually inappropriate" with them.

Gleason says in the letter that he discouraged the women from reporting the incidents, but discussed the matter with Steve Dunleavy, a retired journalist, who offered to relay the information to Trump. Gleason wrote that he later received a phone call from Cohen — whose dealings with Trump are being investigated by federal authorities — and that he disclosed some details of the alleged incidents.

Dunleavy, in a Friday interview with CNBC, acknowledged that he had a relationship with Trump but denied that he spoke to him about the alleged incidents involving the two women.

"I may have spoken to Trump once since I retired" in 2008, Dunleavy told CNBC. He added, "I've never spoken to Cohen, ever, ever in my life."

A cryptic 2013 tweet from Trump, who at the time was being sued by Schneiderman's office for his role in the "Trump University" success program, signaled that he was aware of the allegations. In it, he compared Schneiderman to two disgraced politicians who resigned following their own sex scandals, former New York Gov. Eliot Spitzer and former U.S. Rep. Anthony D. Weiner.

"Weiner is gone, Spitzer is gone — next will be lightweight A.G. Eric Schneiderman. Is he a crook? Wait and see, worse than Spitzer or Weiner," Trump tweeted in September 2013, a month after Schneiderman's office filed its suit against Trump University.

Gleason is asking U.S. District Judge Kimba Wood to grant an order preventing public disclosure of any records concerning conversations he had with Cohen related to the two women. He said the women's identifies should remain confidential.

Gleason said he was motivated to file the request following recent "reckless behavior" by Michael Avenatti, a lawyer for porn star Stormy Daniels who on Tuesday released a seven-page dossier detailing payments made to Cohen by various companies, including one owned by a Russian oligarch.

Schneiderman resigned Monday night just hours after the New Yorker's publication of a story detailing allegations by four women that Schneiderman physically and psychologically abused them.

Gleason told the New York Times that he did not believe the two women who approached him were the same women whose stories are told in the New Yorker article. Michelle Manning Barish began dating Schneiderman in July 2013, according to the New Yorker story, while Tanya Selvaratnam began dating him in August 2016; a woman who remains unnamed in the story recounts an abusive encounter with Schneiderman that same summer, while a fourth alleged victim's account — given to Selvaratnam — is not dated in the story.

Gleason's letter prompted New Yorker reporters Jane Mayer and Ronan Farrow to counter theories that they had obtained any information from sources connected to the Trump campaign, noting that all the women cited in the story were Democrats.

"Just to be clear: not one source for our story on Schneiderman has any ties to Trump or Michael Cohen," Mayer wrote on Twitter. "Our sources all are deeply opposed to Trump and deeply disappointed that Schneiderman let them and their cause down."

Attempts to reach Gleason, Dunleavy, and Cohen were unsuccessful.