While Tuesday night’s election returns have yet to be fully counted, one thing is clear: Democrats will maintain their majority in the New York State Senate. The only question is by how much.

“With the record high number of outstanding absentee ballots that are overwhelmingly Democratic, we will add even more victories to our majority as the vote counts continue,” predicted Senate Majority Leader Andrea Stewart-Cousins.

Mail-in ballots have yet to be counted. But so far, Republicans are ahead in several districts, including one in Brooklyn and three Long Island seats captured by Democrats when they gained control of the Senate in 2018. Democrats were hoping to win more seats this year to attain what’s called a super majority, which comes with the power to override vetoes from Governor Andrew Cuomo. At this point, it doesn’t look promising.

With several victories within reach, Republicans are already crediting the controversial bail reform law passed by Democrats last year.

“It was a huge failure and they paid the price and they should pay the price,” said Robert Trotta, a Republican member of the Suffolk County Legislature.

In Senate races across the state, Republican candidates accused Democratic opponents of going easy on criminals. An ad by Alexis Weik of Suffolk claimed her opponent, incumbent Monica Martinez, allowed “criminal suspects back on the streets” by supporting bail reform.

“When political leaders talk about defunding police, and look the other way when criminals run the streets, I'm concerned about the safety of my family and yours," Weik went on to say in the ad.

Weik's family, as she often mentioned, includes her husband and son who are both police officers. Her Facebook campaign page repeatedly cited her support by police unions, including the NYPD’s Patrolmen’s Benevolent Association, which sought to defeat several Democrats and endorsed President Donald Trump. Weik also likened incumbent Monica Martinez to Mayor Bill de Blasio, who is extremely unpopular in the heavily Republican county.

But Democrats accused Republicans of fear mongering in the suburbs, especially after Trump claimed the George Floyd protests and looting episodes were evidence that Democrats aren’t the party of law and order.

“It's the dog whistle kind of racism,” said Manhattan Senate Democrat Liz Krueger. She said the underlying message was, “you put the Democrats in charge and they stop arresting Black and brown people.”

Krueger said this was a deliberate mischaracterization of last year’s effort to fix the state’s bail system that results in too many people sitting in jail awaiting trial because they are too poor to afford even minimal amounts of bail.

Prosecutors were angry that judges couldn’t set bail on many types of charges they didn’t view as low level crime, including forms of domestic violence, white collar crimes, certain assaults and burglaries. There was an orchestrated backlash as the law took effect in January, with Republicans and the right-leaning NY Post seizing on cases involving suspects who got into trouble after being arrested and then released. A drunk driver on Long Island fatally struck someone and was released without bail, and an upstate man was released after allegedly killing a woman because he was initially charged with second degree manslaughter, which was no longer a bail-eligible offense after the first round of reforms.

The law became a political football in the senate races. Police unions and billionaire Ronald Lauder, who spent millions on an independent expenditure committee called Safe Together New York, claimed the bail law led to a spike in murders and shootings, though there was no evidence. (Democrats called these expenditures “dark money.”) The police also opposed Democrats for repealing a law that shielded their disciplinary records.

During their senate campaigns, Democrats like Martinez in Suffolk touted their vote to amend the bail law over the summer. This happened after police and prosecutors complained that some crimes of violence - such as second degree burglary - weren’t covered by the law, even though violent felonies were still eligible for bail. Judges had to release a suspect accused of breaking into a home, for example.

When asked if his fellow Republicans ran a deceptive campaign, Trotta, of the Suffolk legislature, said every political ad “goes overboard.” But he said it was fair to tie Democrats to party members like Mayor Bill de Blasio, whose progressive policies don’t play as well in the suburbs.

Listen to senior reporter Beth Fertig’s radio story for WNYC:

In addition to Martinez, the following metro-area Democrats elected in 2018 appear to be losing to Republicans: James Gaughran and Kevin Thomas on Long Island, who were challenged, respectively, by Edmund Smyth and Dennis Dunne; and Andrew Gounardes in Brooklyn, who was challenged by Vito Bruno.

Overall, Democrats say they have lost four seats and still control 36 of 63 votes in the senate, down from their current 40 seats. Another eight races are still being counted and they expect to win half of them.

“Given what was going on all around us, I think we did great,” said State Senate Deputy Majority Leader Michael Gianaris, referring to the lack of a “blue wave” optimists in the party predicted. “We’ve established a clear majority with a cushion.”

Democratic political consultant Neal Kwatra said the Republican party’s apparent success in New York makes sense with what happened nationally on Election Day.

“I think it would be hard to deny that some of these issues around criminal justice, around cops in certain districts, clearly had some resonance,” he said. “How much or how determinative, it's too early to say. But that messaging had resonance.”

Huntington town councilman Edmund Smyth is hoping he’ll hang onto his lead over Democratic incumbent Jim Gaughran. When asked about the way the bail law was portrayed as letting criminals go free, he said he “didn’t coordinate” with independent ads by Lauder and the police but also didn’t have a problem with them.

However, he said bail reform was needed for people accused of low level crimes. If elected, he said he would work to make additional changes to the law because the ones that were made by Democrats in July didn’t go far enough.

“That's like the arsonist who puts out his own fire and tries to be a hero afterwards,” he said.

With reporting by Jake Offenhartz