Is the blue wave coming to the New York State Capitol? Photo: Ron Antonelli/Bloomberg via Getty Images

For nearly eight years, a stretch spanning Andrew Cuomo’s entire tenure as governor, New York Democrats have found themselves in a uniquely bizarre and frustrating position: They’ve controlled the state Senate numerically but not practically, because of breakaway members who caucus with the Republicans. Now most of the defectors are coming home, and two special elections on Tuesday could put the Dems a whisker away from unified control of Albany. But oh, what a whisker!

Last year’s local races left the Senate pretty much as it’s been for most of the previous decade, with 31 Republicans, 21 regular Democrats, nine Democrats working with the GOP, and two vacancies. But on April 3, over coffee and cookies at the Capital Grille on 42nd Street, Cuomo brokered an end to the long civil war among Dems. Broadly, the eight members of the Independent Democratic Conference will reunite with the mainstream caucus. Jeff Klein, the leader of the IDC, will become deputy to Senate Minority Leader Andrea Stewart-Cousins. And the state party won’t back primary challenges to the IDC senators.

The governor announced the unity pact in stark moral terms, as forged to dispel the dark shadows cast by Donald Trump. “They are repugnant to all the values that we represent and we hold dear,” Cuomo said of Republicans in Washington. The truth in Albany has always been more complicated. Cuomo was pretty happy to have a GOP-controlled state Senate; depending on which way he wanted to tack at a given moment, he could claim credit for negotiating with Republicans in bipartisan fashion or blame them for killing liberal legislation he might not have loved anyway. But this spring, he needed to show more control over his own party, because he’s feeling a new kind of heat. Veteran consultant Hank Sheinkopf put it bluntly: “This takes an issue away from Cynthia Nixon.”

So adjust the tote board: If the steakhouse summit holds, that bumps the Democrats up to 29 seats, to the Republicans’ 31 seats.

Tuesday’s special elections could change the count again. In Senate District 32 in the Bronx, Democrats outnumber Republicans by a margin of more than 20 to 1. So the only real question is whether Democratic Assemblyman Luis Sepúlveda will break 90 percent in the race to replace Rubén Díaz Sr., who is returning to the New York City Council after 15 years in Albany.

Senate District 37, which runs north from Yonkers along both sides of Route 684, through Port Chester and Armonk to Bedford Hills, will be more competitive. It still might not be close. A GOP led by Jeb Bush or Mitt Romney might find it easy to harvest votes as well as cash from Westchester. But last year’s county executive contest put Trumpism on trial in the northern burbs, with disastrous results for Republicans. Incumbent Rob Astorino, a friend of Trump supported by more Mercer PAC money than any candidate in the state, got wiped out by Democratic challenger George Latimer, who had represented District 37.

The race to fill the seat Latimer vacated pits Democratic Assemblywoman Shelley Mayer of Yonkers against Republican Julie Killian, a former member of the Rye City Council. Total spending on the special election, in which 60,000 people will vote if turnout is exceptional, is zooming past $4 million, with about 60 percent coming from the GOP and its supporters. One group called “New Yorkers for a Balanced Albany,” which supports charter schools and is funded by Walmart heirs, has spent $800,000 bombarding the Lower Hudson Valley with ads attacking Mayer for working with various disgraced Democratic pols. But it’s Killian who has taken the worst hit. After Denise Ward, who calls herself a “harsh negative activist,” hosted a fundraiser for the Republican candidate, it emerged that Ward had tweeted attacks on Parkland survivors David Hogg and Emma Gonzalez. Killian disowned the comments and returned the cash. But now she faces just the kind of how-Fox-News-is-she questions her moderate campaign had been trying to avoid. Gotta watch the friendly fire.

If Democrats hold both open Senate seats on Tuesday, that edges them up to 31 seats — in a 63-seat chamber, with the Republicans also holding 31. And the senator at the fulcrum would be Simcha Felder, who represents heavily Orthodox precincts in Brooklyn.

Felder seriously marches to his own tune. He is a Democrat who backed Barack Obama over Hillary Clinton in 2008, but chose to caucus with Republicans after winning election to the state Senate in 2012. When he was a member of the New York City Council, he preferred Christine Quinn for speaker, but went to the bathroom during balloting so he wouldn’t actually have to vote for a gay candidate. He also launched a campaign against pigeons that was positively Tom Lehrer–esque, and called a flagpole on Foster Avenue one of his proudest accomplishments. As a state senator, Felder has blocked multiple liberal initiatives, but told the members of the IDC to rejoin the regular Democrats. Recently, he has called for armed guards in city schools and held up the state budget while pushing to end state oversight of teaching materials at Orthodox schools.

Whatever his eccentricities, Felder is thoroughly purposeful. In fact, “transactional” is the word that insiders of all stripes use to describe him. “I would say I love slush, every flavor,” the senator himself told the Jewish Star in 2010. “What people criticize as slush is the engine that allows government to help in areas which would never ever get the help.” After the Democratic unity deal, he issued a statement to the Albany Times-Union: “I’m only loyal to G-d, my wife, my constituents, and New Yorkers. I don’t care about political parties.” Felder is well aware of his potential role as kingmaker. And control of the Senate could come down to which side cuts him the best deal after Tuesday.

It’s hard to overstate how much that control means to a certain brand of diehard liberals, who long to see unified state government finally crank its policy machinery at full activist throttle (and whose exasperation with Cuomo forms the core of opposition to the governor within his own party). The Senate stayed Republican for all but one of the 70 years from 1939 to 2008, giving rise to the “three men in a room” form of governance that dominated New York even as the state turned bluer and bluer. And every time the Senate tipping point has seemed within reach since, bizarre events — narrow electoral losses here, defections to the IDC there — have kept control a seat or two away. Now it’s close enough for Democrats to taste, but its cost and meaning still aren’t quite clear. What might Felder demand: guns in schools, tuition tax credits for yeshivas, maybe a bridge to nowhere in Borough Park? And will Cuomo still support single-payer health care if he actually has to sign it into law?

It does look like there’s a blue wave coming. But in Albany, that carries no guarantees.