Assemblyman John D. Ceretto on Wednesday declared victory in what was billed as one of the state’s most competitive Assembly races.

Election figures show the Republican incumbent with a lead of more than 900 votes over Democratic challenger Robert M. Restaino. But the former Niagara Falls City Court judge has not conceded the race, and more than 2,100 absentee ballots will need to be counted before a winner is declared.

Ceretto, though, was sure his lead in the new 145th District would hold when the ballots are counted next week.

“We always expected this to be a close race, but I feel confident this is over,” Ceretto told The Buffalo News. “I can look forward to my next two years.”

Ceretto lost the Niagara Falls vote to Restaino by a more than 2-to-1 margin but controlled most of the suburban and rural areas in the Niagara County district. The key to Ceretto’s late comeback, though, was Grand Island, where his 1,900-vote lead erased his Niagara County deficit.

Ceretto said he was careful not to overlook the new Erie County portion of the district, making Grand Island the first place he campaigned. He also compared the town to his home turf of Lewiston, where he felt his message of bipartisan cooperation with Gov. Andrew M. Cuomo took hold.

“The similarities between Grand Island and Lewiston are really close,” he said. “Most people care about jobs and the economy.”

The one-term Assemblyman is also heartened by the fact that the Niagara County absentee count is tilted toward the Democrats by just 200 votes. Staffers believe Ceretto, a former Democrat, could increase his lead, depending on where the absentee ballots originate. Party breakdowns for the more than 500 Erie County absentees were unavailable Wednesday.

Ceretto’s people also point out that, as it stands, Restaino would have to win the absentee count by a 2-to-1 margin to overtake Ceretto.

Restaino did not respond to multiple requests to comment. Ceretto said Restaino did not call him to concede the race.

Restaino was popular Tuesday night in Niagara County, where he appears to have made a political comeback after being thrown off the bench for jailing 46 people seven years ago after nobody confessed to owning a cellphone that was ringing in his courtroom. Restaino defeated Ceretto by nearly 1,000 votes in Niagara.

Niagara County election officials said the absentee count will begin next Thursday at the earliest, depending on the schedules of the candidates and their attorneys. Affidavit ballots also will be counted, said officials, who were unsure how many of those ballots had been submitted.

“If we have two teams working on this, it’ll go twice as fast,” Democratic Elections Commissioner Nancy L. Smith said. “If we have one team, it could be days. [There are] a lot of what-ifs.”