ALBANY, N.Y. — Andrew Cuomo defended his record over a decade as New York’s governor and portrayed himself as the victim of a “media frenzy” Monday as he later transferred power to Lt. Gov. Kathy Hochul, who became the state’s first female governor.

Cuomo, a Democrat, ended his term just before midnight Monday, just under two weeks after he announced he would resign rather than face a likely impeachment battle over sexual harassment allegations.

Hochul was sworn in early Tuesday during a brief, private ceremony.

In a pre-recorded farewell address released earlier Monday, Cuomo boasted of making government effective in his years in office, cited his work battling the COVID-19 pandemic and struck a defiant tone on the harassment allegations.

He said the report that triggered his resignation — a scathing account of what Attorney General Letitia James said was sexual harassment or inappropriate touching of 11 women — was “designed to be a political firecracker on an explosive topic, and it did work,” Cuomo said. “There was a political and media stampede.”

Cuomo said Monday allegations must still be “scrutinized and vetted.”

But he said prolonging his fight in office “could only cause governmental paralysis and that is just not an option for you and not an option for the state, especially now.”

Cuomo touted his “progressive” record and positioned himself as a bulwark against his party’s left-wing faction that wants to “defund the police” and “demonize businesses.”

He touted New York’s long-awaited passage of same sex marriage under his administration, as well as gun control legislation, a law setting an eventual statewide $15 minimum wage and New York’s efforts in spring 2020 to reduce COVID-19 infections.

Some critics jumped on Cuomo’s last remarks as self-serving.

Assembly member Yuh-Line Niou, a fellow Democrat, tweeted he had a hundred million opportunities to improve as a leader and “chose himself every time. Goodbye, Governor Cuomo.”

The switch in leadership happened in the aftermath of Tropical Storm Henri, which narrowly missed Long Island on Sunday but dumped rain over parts of the Catskill Mountains and Hudson River Valley.

The storm drew Cuomo into public view over the weekend, albeit briefly. He gave two televised briefings — warning New Yorkers to take the storm seriously with the same mix of scolding and reassurance that once made his daily COVID-19 briefings popular.

Cuomo’s top aide, Melissa DeRosa, released a statement that the governor was exploring his options for his post-gubernatorial life but had “no interest in running for office again.”

Polling suggests Cuomo’s long-loyal base of Democratic voters has eroded.

Hochul takes over an administration facing criticism for inaction in Cuomo’s distracted final months in office. For one, COVID-19 has refused to abate.

Hochul, also a Democrat, announced the planned appointments Monday of two top aides: Karen Persichilli Keogh will become Secretary to the Governor and Elizabeth Fine will be Hochul’s chief legal counselor.

She plans to keep on Cuomo-era employees for 45 days to allow her time to interview new hires, but said she will not keep anyone found to have behaved unethically. At least 35 employees in the governor’s office have left since February, according to staff rosters.

Hochul, who said she didn’t work closely with Cuomo and wasn’t aware of the harassment allegations before they became public, has vowed no one will ever call her workplace “toxic.”