NEW YORK — New York Attorney General Eric Schneiderman on Tuesday ended nearly 10 years as the state’s top law enforcement officer under investigation after four women alleged that he physically assaulted them.

The investigation caps a remarkably swift fall for Schneiderman, a high-profile Democrat who had been a public advocate for women but who was accused of repeatedly slapping and choking the four women. Schneiderman denied the allegations, but three hours after they were published in a New Yorker article Monday evening, he said he would leave office the next day.

New York Gov. Andrew M. Cuomo (D) on Tuesday directed Madeline Singas, the Nassau County district attorney, to serve as the special prosecutor investigating the accusations against Schneiderman.

In a letter to the acting attorney general, Cuomo said he was directing Singas to investigate the allegations in the New Yorker story as well as whether any of ­Schneiderman’s staff members or office resources “may have been used to facilitate alleged abusive liaisons.”

“The brave women who chose to come forward deserve swift and definitive justice in this matter,” Cuomo wrote.

New York Mayor Bill De Blasio (D) said he was happy that Schneiderman had resigned quickly and that he hopes others who think they were victims of Schneiderman will come forward and contact police. “Rest assured you will be believed and that the information will be important to protecting others,” he said.

Two women, Michelle Manning Barish and Tanya Selvaratnam, told the New Yorker that Schneiderman had choked and slapped them, leading them to seek medical treatment. A third woman, who was not identified, made similar accusations of physical violence. A fourth — who was not identified but was described as a lawyer who has held high positions in the New York legal sphere — told the magazine that when she rejected one of Schneiderman’s advances, he “slapped her across the face with such force that it left a mark that lingered the next day.”

All four women said the physical abuse was not consensual.

Schneiderman denied the allegations. “In the privacy of intimate relationships, I have engaged in role-playing and other consensual sexual activity. I have not assaulted anyone. I have never engaged in nonconsensual sex, which is a line I would not cross.”

The allegations were stunning given Schneiderman’s record of advocating for women, including pursuing a case against movie producer Harvey Weinstein, who has been accused of repeated assaults and attacks on women.

Manning Barish, an activist and writer, replied on Twitter to a message from actress Rose McGowan, who has accused Weinstein of rape: “Because you you, my sister, @rosemcgowan because of your bravery to speak truth to power and face your perpetrator, you have given so many women the strength to use their own voices. Bravery is contagious; but truth is unstoppable.”

Schneiderman, 63, was first elected attorney general in 2010 and was expected to easily win a third term in November, with no Democratic primary challenger. He was widely believed to be preparing a future run for governor.

“The guy’s future was limitless,” said Douglas Muzzio, a political science professor at Baruch College. Now “he is going to be known for the hypocrisy of his private life versus his public life. That becomes the story more than his substantive accomplishments.”

Schneiderman was also an outspoken foe of President Trump, filing more than 100 lawsuits challenging the administration on immigration, environmental standards and taxation. Last month, he sought to expand his powers to prosecute people who had received presidential pardons.

Those efforts are likely to be slowed, if not significantly hampered, as New York scrambles to find a permanent replacement for Schneiderman, Muzzio said.

“There’s all kinds of high political drama going on,” he said, and as for the lawsuits Schneiderman was leading against the Trump administration, they may lose a step. “In fact, it may be backwards steps in terms of the issues he fought for,” Muzzio said. “It’s a setback, at least temporarily.”

New York Solicitor General Barbara Underwood has been named acting attorney general; she is a former Yale Law School professor who once worked as a law clerk to Supreme Court Justice Thurgood Marshall. The state Senate and Assembly will choose a permanent successor by joint ballot.

“Our office has never been stronger, and this extraordinarily talented, dedicated, and tireless team of public servants will ensure that our work continues without interruption,” Underwood said in a statement.

But as the state’s Democrats huddled in meetings Tuesday, no clear timeline emerged.

Before Cuomo called for a special prosecutor, the Manhattan and Long Island district attorneys’ offices said they would investigate the allegations, highlighting the sea change facing Schneiderman.

Just two months earlier, Cuomo tasked Schneiderman with investigating how Manhattan District Attorney Cyrus R. Vance Jr. had handled a sexual assault allegation against Weinstein. Cuomo expressed concerns Tuesday about Vance’s office leading an investigation of Schneiderman, saying that the earlier probe may create a “perception issue” and that he did not want any questions about impartiality in the case.

In his letter later Tuesday appointing Singas as special prosecutor, Cuomo said she would supplant Vance on the case, writing that “there appears, at a minimum, an appearance of a conflict of interest” if his office remains involved.

Vance wrote his own letter to Cuomo on Tuesday night objecting to the move, saying that “the only potential conflict here is one of your creation,” because of the governor’s earlier decision to have the attorney general’s office review his own. He also wrote that “the purported conflict no longer exists” since Schneiderman resigned.

The women described abuse that occurred in several New York counties, which could give a number of district attorneys authority to investigate, Cuomo said.

Neither woman named in the New Yorker story reported Schneiderman’s alleged abuse to the police at the time, according to the article. They could not be immediately reached for comment on whether they would cooperate with an investigation.

James P. O’Neill, the New York City police commissioner, said the department’s chief of detectives had spoken Tuesday with Vance about the “very serious allegations” against Schneiderman. O’Neill said he was comfortable working with that office despite Cuomo’s concerns. He said he would not speculate about what charges Schneiderman could face.

Authorities plan to contact the people identified in the article to conduct “a full investigation” into the accusations, O’Neill said at a news conference. As of Tuesday afternoon, police had not received any complaints regarding Schneiderman, O’Neill said.

Schneiderman is looking for a criminal defense attorney, according to the New York Times, which cited unidentified people familiar with the situation.