Rep. Charles Rangel was declared the winner Wednesday in his Democratic primary battle for a 23rd term by The Associated Press, which deemed his unofficial 1,828-vote lead over state Sen. Adriano Espaillat insurmountable.

"Words cannot describe my overwhelming gratitude to the voters . . . for standing with me to the very end and giving this veteran his one last fight," Rangel, 84, said in a statement. "I hope to begin the healing process of some of division that was created during the course of the campaign."

The AP news wire made its decision 19 hours after polls closed, after receiving information from the New York City Board of Elections on how many absentee and provisional ballots were still to be counted. The AP concluded Espaillat could not close the gap.

Espaillat, 59, has not yet conceded, and his campaign Wednesday stood by the senator's statement late Tuesday that the race is too close to call. Unofficial results showed that Rangel led Espaillat 22,674 to 20,846, or 47.4 percent to 43.6 percent, with all voting precincts reporting.

The Board of Elections said it has received 989 validated absentee ballots from 13th District voters in Manhattan and the Bronx and 2,306 affidavits that are not yet validated. Typically, about half of collected affidavits are valid, said board spokeswoman Valerie Vazquez. The board can receive paper ballots until Tuesday. It will open them the next day.

Rangel's campaign said he would attend a "unity rally" at the Rev. Al Sharpton's House of Justice on Saturday. Espaillat's campaign did not comment on whether he would attend.

The campaigns had been embroiled in acerbic exchanges between the veteran congressman and his challenger, who drew their electoral strengths from the black and Dominican communities respectively.

Sharpton, who had declined to endorse a candidate, called Rangel the victor on his MSNBC program Wednesday.

"I think that we've got to move on now," Sharpton said. "And here in the community, we do not need black against brown against white."

Christina Greer, assistant professor of political science at Fordham University, said Rangel had grown more as a candidate than Espaillat did since their first faceoff in 2012, which Rangel won by less than 1,100 votes.

"Rangel understands how to win . . . I think he understands that each race is a different race," Greer said. "He did not take Espaillat for granted this time at all." Espaillat failed to make a case against Rangel "beyond this guy's been here too long," she said.

If Espaillat intends to seek re-election for his Senate seat, he must collect and submit 1,000 signatures in a designating petition by July 10.