It looks like John D. Ceretto may end up holding onto his state Assembly seat – and if he does, he’ll have Grand Island to thank.

Early this morning, when all the votes were counted from the ballot boxes in the 147th Assembly District, the first-term Republican from Lewiston was ahead in the district by 905 votes over Democrat Robert M. Restaino of Niagara Falls.

Restaino, a former Niagara Falls City Court judge, beat Ceretto in western Niagara County by an unofficial vote of 19,784 to 18,793, a 991-vote margin.

But Ceretto won on Grand Island in Erie County, by a vote of 5,488 to 3,592 – a 1,896-vote cushion.

About 2,200 absentee ballots remain to be counted in the race but Restaino would have to win about two-thirds of them to overcome the difference at the polls.

The race was Western New York’s most competitive Assembly contest and results from polling sites weren’t reported until early this morning. That’s because a website in Niagara County crashed in midevening and town and city clerks from across the county had to drive to the Board of Elections in Lockport to deliver memory cards from voting machines to be read.

By then, Ceretto was well ahead on Grand Island over Restaino, who was removed from the bench in 2005 after he jailed 46 people after hearing a cellphone ring in his courtroom.

The two candidates were competing in a new district that gained Democratic voters through redistricting, but it appears that still wasn’t enough to give Restaino the win.

Meanwhile, there will be a newcomer to the Assembly in the 147th District, where former East Aurora Mayor David J. DiPietro, a Republican, defeated Independent candidate Christina Abt of Eden.

Of 12 Assembly races in Western New York, two were unopposed, and incumbents were favored in eight others.

139th District

Republican Stephen M. Hawley, of Batavia, won re-election, facing a minor party challenge from Libertarian Mark E. Glogowski, of Hamlin, who has a doctorate in chemistry. Hawley has served in the Assembly since his election in February 2006. The son of a former assemblyman, he is an insurance company owner and former Genesee County legislator. He is a member of the committees on agriculture, insurance, racing and wagering, veterans’ affairs, ways and means and women veterans. He also ran on the Conservative and Independence party lines. Hawley won with 93 percent of the vote.

140th District

Democrat Robin L. Schimminger, of Kenmore, had no trouble winning re-election to his 19th term, beating Charles M. Gilbert, an electrician who served one term on Tonawanda City Council. With all districts reporting, Schimminger won, 69.5 percent to 30.5 percent. Schimminger was endorsed by the Buffalo Niagara Partnership, as well as groups praising his stance on issues important to small business, and ran on the Democrat, Conservative and Independence lines.

Gilbert was endorsed by several labor unions, but had to overcome the well-known Schimminger, whose spending was four times greater. Gilbert ran on the Republican and Working Families lines.

141st District

Crystal D. Peoples-Stokes was expected to easily beat back opposition from Ricky T. Donovan Sr. to win a sixth term. The Democrat, a former Erie County legislator, has overwhelmed her opposition, or been unopposed, since being elected to the Assembly in 2002. With 99 percent of the vote counted, she was winning 89.7 percent to Donovan’s 10.3 percent. She also ran on the Working Families line. Donovan, a state corrections officer and executive director of the Erie County Independence Party, ran on the GOP and Independence lines.

142nd District

Incumbent Michael P. Kearns, running on the Democratic, Republican, Conservative and Working Families lines, was unopposed. He has been serving since he won a special election last March.

143rd District

Dennis H. Gabryszak was easily re-elected to a fourth term. The former Cheektowaga supervisor and Depew trustee, who had the Democrat, Conservative and Independence party nods, defeated Republican Frank M. DeCarlo, a small-businessman from Lancaster, 73.1 percent to 26.9 percent.

144th District

Republican Jane L. Corwin, of Clarence, running on the Republican, Conservative and Independence lines, was unopposed for her third term.

145th District

Republican Ceretto, also running with the Conservative and Independence party support, appears in the driver’s seat in the district, thanks to Grand Island.

Restaino remains popular in the Falls, and won the unofficial vote count in Niagara County, but Ceretto’s cushion on Grand Island has him up by more than 900 votes with about 2,200 absentee ballots yet to be counted.

A former City Court judge, Restaino entered the race four years after he was removed from the bench for jailing 46 people after he thought a cellphone rang in his courtroom. He also is a Niagara Falls School Board member and has the Working Families line. Ceretto came out ahead in votes two years ago when he won a three-way battle with then-Assemblywoman Francine DelMonte and John G. Accardo in what was then the 138th District.

146th District

Incumbent Republican Raymond W. Walter, of East Amherst, won election to his first full term, turning back a challenge from Independence Party member Joanne Schultz, an attorney from Amherst, 54.2 percent to 45.8 percent.

Walter, an attorney with Magavern Magavern Grimm and a former Erie County legislator, won election last November in a special election to fill the remainder of the term of Assemblyman James P. Hayes. He also ran on the Conservative and Independence lines.

147th District

Former East Aurora Mayor DiPietro and Abt were vying for the seat in the far-reaching district that covers southern Erie County, parts of the Cattaraugus Indian Reservation and all of Wyoming County.

DiPietro won the seat by a margin of 55 percent to 45 percent.

DiPietro, who owns three Sparkle dry-cleaning stores, ran on the Republican and Conservative lines. Media and public relations consultant Abt had hoped to capture the support of farmers in the rural district, and ran on the Democratic, Independence and Working Families lines.

148th District

Incumbent Joseph M. Giglio, of Gowanda, retained his seat over a challenge from Great Valley Supervisor Daniel J. Brown in the district that covers Cattaraugus, Allegany and part of Steuben counties.

Giglio, a former New York State deputy inspector general and small-business owner, ran on the Republican, Conservative and Independence lines.

Brown, a farmer, had the support of the Democratic and Working Families parties. Giglio won, 64.8 percent to 35.2 percent.

149th District

Sean M. Ryan once again dispatched his opponent, Joseph A. Mascia. In final results, it was 82.8 percent for Ryan and 17.2 percent for Mascia.

Ryan had the Democratic and Working Families line while Mascia, who Ryan beat in the Democratic primary, appeared on the Conservative line.

Ryan won a seat in the Assembly a year ago in a special election after Sam Hoyt left the State Legislature to become head of the Western New York region of the state Economic Development Corp.

Mascia is a member of the Buffalo Municipal Housing Authority Board of Commissioners.

150th District

One-term incumbent Andrew Goodell, of Chautauqua, won re-election to a second term.

The former Chautauqua County executive got votes on the Republican, Conservative and Independence lines. He beat Rudy Mueller of Lakewood, a physician and former Chautauqua County legislator, 61.4 percent to 38.6 percent.