TROY - Republicans in the Capital Region appeared to beat back the Democratic wave that hit the rest of the state in special elections on Tuesday.

The state Assembly seats formerly held by Steve McLaughlin and Peter Lopez are likely to remain in Republican hands, as Chris Tague and Jake Ashby clung to narrow leads late Tuesday night.

In the 107th Assembly District, which includes parts of Washington, Rensselaer, and Columbia counties, Ashby had 7,797 votes and Democrat Cindy Doran had 7,517 votes.

"The race is not over," Doran told supporters gathered at a bar in Lansingburgh.

Approximately 1,000 absentee ballots were cast in the race, but Ashby's lead is probably insurmountable.

Democrats fared better downstate, flipping an Assembly seat on Long Island and cruising to victory in a hard-fought state Senate race in Westchester County.

Elsewhere in New York, Democrats held on to three Assembly seats in New York City and one in the Buffalo area, and Republicans defended two Assembly seats on Long Island. Democrat Erik Bohen, who ran on the Republican line, won a Buffalo area Assembly seat that Democrats previously held.

In the Senate, Democrats also held a seat in the Bronx. Democrat Steve Stern pulled of an upset in an Assembly seat on Long Island that Republicans held for more than three decades.

All of the winners in Tuesday's special elections will have to run in November for a full two-year term. The petitioning process to get on the ballot will begin on June 5.

Ashby, who grew up in Castleton and lives in Schodack, was deployed twice to Iraq as a member of the Army Reserves and runs his own occupational therapy practice. He won his first election last year with a seat on the Rensselaer County Legislature, representing Schodack, Nassau and Sand Lake.

As a member of the Assembly, his votes will likely mirror McLaughlin's record of opposition. Ashby has pledged to be a voice for the Second Amendment and wants to focus on environmental, business and veteran issues.

Looming over the race was the seat's former occupant, McLaughlin, who gave up the seat to win election in 2017 as Rensselaer County executive and he actively campaigned to make Ashby his successor.

Ashby said during the campaign that McLaughlin was a positive influence and helped his chances for victory.

Doran remarked during the campaign, "I feel like at times I'm running against Steve McLaughlin."

McLaughlin first won the seat in 2010, defeating incumbent Tim Gordon, and was re-elected without opposition in 2016.

Turnout for the race was almost 18 percent, which was actually higher than expected for a special election, where voters are much less likely to vote.

In the 102nd Assembly District, a sprawling a seven-county area that includes Schoharie and Greene and parts of Albany, Columbia, Ulster, Delaware and Otsego counties, Tague collected 8,547 votes and Democrat Aidan O'Connor had 8,259. Third-party challenger Wes Laraway also amassed 1,809 votes.

Tague is currently the Schoharie town supervisor and said he plans on being a voice for rural upstate in the Assembly, which is dominated by Democrats from New York City. His priorities in office include expanding access to high-speed internet, supporting dairy farmers and controlling state spending.

"You won't find anyone who will work harder or be more dedicated," Tague said during the campaign.

The Capital Region Assembly races garnered the attention of labor organizations, which threw their support behind Doran and O'Connor, and mobilized members to knock on doors, volunteer for phone banks and vote. With such low voter turnout on Tuesday, the union members likely made up a disproportionate percent of the vote.

Additionally, in the weeks leading up to the election, the powerful New York State United Teachers union's political action committee spent more than $78,000 on mail and advertising for Doran, according to the state Board of Elections.

The Democratic Assembly Campaign Committee also invested its resources in the races, spending more than $55,000 for Doran and $62,000 for O'Connor, according to the most recent filings with the state BOE. By contrast, the Republican Assembly Campaign Committee reported spending about $25,000 on Tague and less than $4,000 on Ashby.