With 100% of precincts reporting early Wednesday, Rangel led by 3.8 percentage points -- or 1,828 votes. There could be enough outstanding ballots to flip the result, however.
The 84-year-old Rangel, who was first elected to
"At what point do you accept victory, or what do you do?" Rangel wondered aloud.
"We don't need a whole lot of numbers to be able to tell you how good we feel," Rangel said as chants of "Charlie, Charlie" filled the room. "The people have won."
Eventually, balloons floated down from the ceiling and speakers took the microphone to congratulate Rangel.
Espaillat, 59, hopes to become the first Dominican American elected to the
"We ran a great campaign," said Espaillat's campaign spokeswoman, Chelsea Connor.
After the tight race in 2012, a Rangel victory this time seemed far from certain, despite recent polls giving him a double-digit lead over Espaillat. The district's Latino population has increased, and Rangel was haunted by voter memories of a 2010 ethics scandal that led to his House censure – the first since 1983.
But the raspy-voiced Rangel, who was a founder of the Congressional Black Caucus, had name recognition and loyalty from many voters in his Harlem stronghold.
"I've lived in Harlem all my life. Charlie is home," said Calvin Hunt, 53, who wore a T-shirt with a photo of Rangel on the front and waited outside the Harlem school where the congressman cast his vote.
Hunt said he was a parishioner at the church where a third candidate, Michael Walrond Jr., is the pastor. Although he admires Walrond, Hunt said, he trusts the "political nitty-gritty" of Rangel.
"I hope the preacher understands," Hunt added.
Rangel was in better position to wage a vigorous campaign than in 2012, when he was recovering from a back ailment that limited his ability to be out among voters.
"He was really out a lot throughout this campaign, much to the surprise of people, especially since many of his opponents wanted to talk about the age and [Rangel] being there too long," C. Virginia Fields, the former Manhattan borough president and a Rangel supporter, told New York's NY1 television.
Espaillat, who came so close to victory two years ago, campaigned on promises of change for constituents in the mainly working-class and poor district.
"They want change. They want a break from the past, and they want to be part of the future," Espaillat said Tuesday, campaigning until the polls closed.
Espaillat alluded frequently during the campaign to Rangel's past ethics problems. He cast his opponent as a career politician who cared more about himself than the people he represented.
But Rangel likened himself to an old horse who kept winning races. "Why would you change it for anyone who doesn't know where the track is?" he said in a jab at Espaillat's inexperience in Washington.
Regardless of the results, it was a bittersweet day for Rangel, who showed up to vote with his wife, Alma, by his side.
"This will be the last time I'll be voting for myself for any office," Rangel said. He had promised his wife that he would spend more time with family after finishing his congressional career, he said.
"Besides my passion for public service, I should have had a little more passion for my wife, my children and my grandchildren," he said.
Alma Rangel agreed but said her husband deserved one last term. "His record speaks for itself," she said.
Although Rangel denied that race or ethnicity played a major role in the election, voting maps told a different story. They indicated that most voters in mainly Latino precincts backed Espaillat and that voters in mainly black precincts supported Rangel.
One question was what impact Walrond would have on the outcome. The pastor, who is also black, was seen as likely to take African American votes from Rangel; he ended the night with just under 8% of the vote. A fourth candidate, activist Yolanda Garcia, had 1%.