Democrats retained control of the 63-seat Senate, but it remained unclear whether Republicans — who won seats on Long Island and another in the Hudson Valley — had won the two seats needed to eliminate the Democrats’ veto supermajority. In the 150-seat Assembly, Republicans managed to unseat some longtime Democrats in pockets of New York, scoring surprise victories in areas where Lee Zeldin, the Republican gubernatorial candidate, performed strongly despite losing the race. But even with votes counted in other races, Republicans did not appear on track to pick up the eight seats needed to defeat the two-thirds Democratic supermajority. Hoping to ride a national wave of momentum this midterm election, Republicans have been aggressively trying to expand their seat on Capitol Hill, just four years after the anti-Trump backlash helped Democrats wrest control of the upper chamber from Republicans in 2018. . Democrats have held the trifecta of power in Albany ever since: The party has controlled the Assembly for nearly five decades and the governor’s mansion for nearly 16 years, a streak that will continue with Gov. Kathy Hotchul’s victory Tuesday. The party’s dominance of the State Capitol has allowed Democrats to enact a number of progressive priorities on housing, abortion rights and climate change. Gov. Kathy Hotchul’s victory means Democrats will continue to hold a stranglehold on Albany. Credit…Hiroko Masuike/The New York Times But by focusing on voters’ concerns about crime and inflation, Republicans have been trying to control that unfettered influence this election cycle, hoping to ride the coattails of Republicans at the top of the ticket in swing districts. In the Assembly, Republicans found success in southern Brooklyn, a more conservative part of an otherwise overwhelmingly Democratic borough, unseating at least two incumbent Democrats. Among them were Steven Cymbrowitz, a 22-year-old Democratic congressman who chairs the lower house housing committee, and Peter J. Abbate Jr., who was first elected in 1986. Other Assembly races remained unsettled in Long Island and Queens, with some so close they are headed for recounts, but Democrats expected their current 107-seat majority to fall between 100 and 103 seats. William A. Barkley, the Republican minority leader in the Assembly, said he was proud of his party’s gains in the lower house, projecting that Republicans would pick up between five and seven seats. “The Assembly Republicans will represent districts they’ve never carried before, we’ve flipped several seats, and our conference has grown in a redistricting year — something that’s never happened,” he said. Republicans made some gains in the Assembly, where William A. Barkley, second from right, is minority leader. Senate Democrats said they had won at least 40 seats — three seats short of the current 43-seat majority — with two more races likely to be headed for a recount. “The voters of New York have spoken, electing another strong Democratic majority to the State Senate,” State Sen. Andrea Stewart-Cousins, the Democratic majority leader, said in a statement early Wednesday. Even so, Senate Republicans made significant inroads on Long Island, a district where the party’s public safety message continued to resonate strongly with suburbanites and independent voters. Attacking one-party rule in Albany and Democratic changes to the state’s bail laws, Republicans appeared to win seven of nine seats on Long Island, restoring the party’s control there in Nassau and Suffolk counties after ceding it to Democrats in 2018. The expected losses in Long Island were so dire that Democrats had abandoned spending to protect one of their most vulnerable incumbents, Sen. John Brooks, a Democrat who was defeated by his Republican opponent, Steven Rhodes. State Sen. Anna Kaplan, a moderate Democrat first elected in 2018 as part of the so-called blue wave, was defeated by Jack Martins, a Republican who previously served in the Senate. “It is now time to turn from politics to the work we were elected to do, which means rolling up our sleeves and working together to address the real issues facing New York,” Mr. Martins said in a statement. Jack Martins defeated Anna Kaplan, a moderate Democrat who was elected in the “blue wave” of 2018. Credit…Johnny Milano for The New York Times The only glimmer of hope for Long Island Democrats was the apparent victory of Monica Martinez, a former state senator who won a heavily Democratic seat after the courts redrawn it in this year’s redistricting process. Indeed, the new court-drawn maps helped Democrats pick up at least two open seats that were considered friendly territory, allowing them to prevent an even greater erosion of their Senate majority. That included the victory of Kristen Gonzalez, who won an uncontested race in a new district that includes the hotbeds of the progressive movement in Brooklyn and Queens. She will become the third candidate endorsed by the Democratic Socialists of America to join the Senate. One of the Senate races that remained too close to happen was in a newly drawn South Brooklyn seat that includes Sunset Park, the borough’s Chinatown. Many Democrats expected their candidate, Iwen Chu, a former Assembly staffer who is Asian-American, to win in a district with many Asian voters. But she was leading her Republican challenger, Vito J. LaBella, who is white, by only a few hundred votes as of Wednesday morning, a clear sign that the party’s tough message had helped sway many Asian voters to Republicans this cycle. . Up north in New York, Senate Democrats used their significant fundraising advantage to spend big to hold off a series of strong Republican challenges in the Hudson Valley. But it wasn’t enough to prevent the fall of Sen. Elijah Reichlin-Melnick, a first-time Democrat from Rockland County, who lost to Bill Weber, a Republican. “This is a very, very tough political environment we’re facing,” Mr. Reichlin-Melnyk said at an election watch party on Tuesday. “People are angry. They are scared. They are looking for solutions. And they turn to a party that doesn’t have it.” Jay Root contributed reporting.