A longtime aide to New York Attorney General Letitia James quit on Friday amid allegations he sexually harassed at least two women, though the aide denied the allegations.

According to a report by The New York Times, Ibrahim Khan, James' chief of staff, was accused by at least one woman of inappropriately touching and kissing them. The Times — which cited people with knowledge of the matter — said one of the women's accusations was substantiated.

Khan has been James' chief of staff for nearly a decade, going back to the AG's days as New York City's public advocate beginning in 2014, according to his LinkedIn page.

In a statement to Gothamist, Khan said the timing of his resignation had nothing to do with the allegations.

“After a successful four-year term, I’ve been slated to leave the office for the private sector at the end of this year," Khan wrote. "This is unrelated to an investigation which, nevertheless, found no official workplace misconduct. I’m proud of all we have achieved over these past four years in serving New Yorkers.”

In a statement from Delaney Kempner, a spokesperson for the attorney general's office, the office did not explicitly tie Khan's resignation to the investigation.

"The office takes these matters with the utmost seriousness, and this situation is no different," Kempner wrote. "An independent, impartial investigation was conducted, and the employee has since resigned.”

James aggressively went after former Gov. Andrew Cuomo, who was accused by 11 women of sexual misconduct. Her report ultimately led to Cuomo's resignation in August of last year.

Correction: The article has been updated to correctly identify the spokesperson who sent the statement on behalf of the state attorney general’s office. The story has also updated to correct the year Ibrahim Khan served as the chief of staff for Letitia James when she served as public advocate.