The Board of Elections released numbers on Saturday night based on data uploaded from memory sticks in each ballot scanner, showing Mr. Rangel received a total of 18,075 votes in the Democratic primary, or 44.29 percent of the votes cast, and Mr. Espaillat received 17,273 votes, or 42.33 percent.

Image Representative Charles B. Rangel Credit... Christopher Gregory/The New York Times

On Friday, Mr. Espaillat filed a petition in State Supreme Court in Manhattan against the Board of Elections, the New York Police Department, Mr. Rangel and three other candidates in the race, asking the court to supervise the canvassing process. The petition cited discrepancies in the reporting and counting of votes. It charged that, as of Friday, 6 percent of precincts in the district, many of them in areas where Mr. Espaillat was expected to do well, had not reported their vote totals.

Justice Donna M. Mills ordered the parties to appear in her courtroom on Monday afternoon.

“We want to make sure that we have an opportunity to exercise every right every candidate has, to not only observe the canvassing of ballots but to protest or challenge ballots,” Mr. Connor said.

On Saturday, the Dominican American National Roundtable called on the United States Justice Department to monitor the Board of Elections proceedings, citing concerns about voter suppression in heavily Latino voting districts.

On election night, poll workers at each polling place are supposed to complete a so-called return of canvas sheet, with totals of the votes received by each candidate. Police officers take the sheets to the local station house, where the totals are entered by hand into the department’s computer system. The department then provides the computer records to The Associated Press.