ALBANY – The New York assemblyman accused of asking young female staffers to massage him, touch his cancerous tumors and join him in hotel rooms said Saturday he will resign rather than possibly be expelled from the State Legislature amid sexual harassment allegations.

The announcement by Democratic Assemblyman Vito Lopez, 72, a once-powerful Brooklyn Democratic leader, came as a surprise. A day earlier, he had defied demands by Assembly Speaker Sheldon Silver and Gov. Andrew M. Cuomo, leader of the state Democratic party, to resign immediately.

Instead, Lopez said he would resign at the end of the legislative session on June 20 to fully pursue his candidacy for the New York City Council.

In a single, terse sentence Lopez announced the resignation from the seat he’s held since 1984: “I hereby resign the public office of Member of the Assembly from the 53rd Assembly District, Kings County, effective 9 a.m. Monday, May 20, 2013.”

Silver announced Lopez’s reversal. The powerful speaker had planned Monday to begin a rare and uncertain effort to expel a sitting lawmaker. Expelling Lopez could have proved difficult – he’s not charged with any crime and was overwhelmingly re-elected in November, when the scandal was already widely known.

But Lopez and Silver have been under increased pressure since last week, when reports from Special Prosecutor Daniel Donovan and the state Joint Commission on Public Ethics detailed allegations involving four female staffers. The allegations include Lopez forcing his hand up a woman’s leg, trying to coerce them to share hotel rooms with him, touching the tumors on his neck and requiring them to write flattering and flirtatious memos to him that he later tried to use to discredit their accusations.

The allegations involving two women came last summer, when the scandal first became public. That’s when Silver and top Assembly staffers, along with reviews by top staffers for Attorney General Eric T. Schneiderman and Comptroller Thomas DiNapoli, authorized a secret $103,000 settlement for Lopez’s first accusers.

Lopez has denied sexually harassing anyone. He noted the two investigations found he committed no crime and that only the voters should decide if he leaves office. His attorney didn’t respond to a request for comment Saturday.