New York Senate Democrats have resolved a longstanding internal power struggle that empowered Republicans and prevented votes on liberal priorities including gun control, early voting, abortion rights and help for immigrants.

Under a deal negotiated by Democratic Gov. Andrew Cuomo and announced Wednesday, the eight-member faction known as the Independent Democratic Conference is reuniting with mainline Democrats. Democratic leader Andrea Stewart-Cousins of Yonkers will lead the combined group, with IDC leader Jeff Klein of the Bronx as deputy leader.

"Together, certainly with the governor, we will be able to do all of the things that we know are important to make sure New York stays the progressive beacon that it is," Stewart-Cousins said at a press conference Wednesday.

Cuomo cited what he called the Trump administration's economic attack on New York as a reason for the new alliance.

"We believe with that united effort, we're going to have success in November. In truth, with what's going on in Washington, failure is not an option here. We can't take another two years like the past two years. This is eroding the progressive soul of New York, as well as eroding and attacking the economic race of New York. So that's what today is all about."

Republicans control the Senate with support from the IDC and a ninth breakaway Democrat, Brooklyn Sen. Simcha Felder. Felder hasn't said whether he'll also return to the Democrats.

Republicans still hold the Senate majority for now, though Democrats hope to take over following two special Senate elections April 24.

State Sen. Michael Gianaris of Queens will remain in his leadership post.

The IDC splintered off seven years ago to work with Republicans to form the political majority in the Senate.

Klein, who agreed to the deal Tuesday, has the most to lose. His coalition with Republicans for control of the Senate has resulted in larger offices for members and significant say over what bills come to the Senate floor, which can include money for individual IDC member districts.

"I had the privilege of growing up in the Bronx in a two-family home with my grandparents, and I remember my grandfather always saying, 'Sometimes, you have to take a step back before you can take two steps forward,'" Klein said at the press conference. "That is what we are doing here today."

We asked Cuomo why he didn't bring the two sides together sooner:

"First of all, because it wasn't simple. The premise of your question was if it was simple. I think things come at the time that they are ready to come," Cuomo said. "We are now looking at a situation that is unprecedented."

Cuomo denied that his haste in making the deal had anything to do with Democrat Cynthia Nixon entering the governor's race.

Cuomo has also denied that he helped empower the IDC, and, by extension, Senate Republicans. It's a charge that has come from many on the left, including Mayor Bill de Blasio.

"He has aided and abetted the IDC from the beginning," de Blasio said about Cuomo. "He is one of the reasons the IDC exists, one of the reasons we have had de facto Republican government in the state Senate."

In a statement, state Senate Republicans said Democrats are willing to throw away all the progress in New York to avoid primaries. They also added that Cuomo's motivation stems from the challenge to his left from Nixon.