“Where Washington D.C. has failed to lead on the issues that matter, Eric has made clear that New York will provide a road map for the rest of the country,” his biography on the attorney general’s office website says.

He had also raised his profile nationally in the last year by repeatedly taking on President Trump’s agenda in the courts. (Mr. Trump himself has been accused of sexual misconduct, though he has denied the allegations.)

Even before Mr. Trump took office, Mr. Schneiderman had filed a lawsuit against Trump University. And more recently, he had been pushing to change state law so his office could prosecute Mr. Trump’s aides if the president pardons them.

“We must ensure that if the president, or any president, issues such pardons, we can use the full force of New York’s laws to bring such individuals to justice,” Mr. Schneiderman said last month.

Other actions Mr. Schneiderman has taken in opposition to Mr. Trump include a lawsuit filed to block the president’s travel ban and a vow to defend the rights of sanctuary cities in his state.

Last June, Mr. Schneiderman helped introduce a bill last year in the State Legislature for cost-free contraception, similar to legislation he had called for in the previous year. But he said last year in an interview that he introduced it again because Mr. Trump’s election increased his sense of urgency.

What he has said about women

Mr. Schneiderman had been outspoken about women’s issues throughout his career.

In 2010, while he was still a state senator from Manhattan, he introduced a bill to make intentional strangulation to the point of unconsciousness a violent felony. That same year, the National Organization for Women’s New York branch endorsed him in his successful bid for attorney general, citing his “unmatched work” in “protecting women who are victims of domestic abuse.”