Democrat John Brooks has won the 8th Senate District race after a five-week count of more than 8,000 paper ballots, election officials and political party leaders said Thursday.

After finishing their count, Nassau election officials said Brooks, a former Seaford school board member, won by 258 votes over incumbent GOP State Sen. Michael Venditto (R-Massapequa) in the Nassau portion of the district.

Suffolk County’s Board of Elections has 211 ballots still to open Friday, but GOP officials conceded the race was over.

“Mathematically, there is no reversing this,” said Venditto’s attorney John Ciampoli, who waived the right to appeal the results on Thursday.

State Supreme Court Justice Arthur Diamond directed Nassau’s elections commissioners to certify the results Thursday. Suffolk is expected to certify its results Friday after opening the remaining ballots.

“The Republicans finally saw the numbers were overwhelming,” said Nassau Democratic Party Chairman Jay Jacobs. “Brooks is going to be a great senator. It has been a hard fight and I’m glad it ended well.”

advertisement | advertise on newsday

In a statement, Venditto acknowledged the results. “The campaign is over and all of the votes have finally been tallied. I would like to congratulate Senator-Elect John Brooks on his victory.”

He added, “On a personal note, it has been a privilege and a pleasure to serve as your State Senator for the past 2 years.”

Brooks will be Long Island’s second Democratic state senator, alongside Todd Kaminsky (D-Long Beach).

On Election Day, Brooks held a 33-vote lead over Venditto, who was seeking a second term.

For much of the campaign, Brooks, a former chief of the Seaford Fire Department, trailed his well-known and better-funded opponent.

On Oct. 21, Venditto’s father, Oyster Bay Town Supervisor John Venditto, was indicted on federal corruption charges. Also charged were Nassau County Executive Edward Mangano and his wife, Linda. All have pleaded not guilty.

While Michael Venditto was not implicated, county and Senate Democrats sought to capitalize on the scandal to boost Brooks.

Brooks’ win gives Democrats a numerical majority in the 63-seat Senate. But Republicans, including Senate Majority Leader John Flanagan (R-East Northport) continue to hold power, with conservative Democratic Sen. Simcha Felder caucusing with the GOP.

advertisement | advertise on newsday

Also, the seven-member Independent Democratic Conference in the past has had a power sharing arrangement with Senate Republicans. The IDC is expected to again work with the GOP to form a working majority in 2017.

Meanwhile, Nassau and Suffolk elections officials are expected to begin certifying the results in the 5th State Senate District, where Republican Sen. Carl Marcellino of Syosset holds a significant lead over Democrat James Gaughran of Huntington.

Gaughran, chairman of the Suffolk County Water Authority, is challenging absentee and provisional paper ballots. But to win, he would have to win 64 percent of the remaining ballots, including many in reliably Republican areas, officials said.

Jacobs said he expects a decision in the contest next week.

With Michael Gormley