Challenger Salvador Nasralla has alleged fraud and said he won't respect the official results. He's watched an initial five-point lead diminish in recent days as official results have trickled out.
Thursday night, Hernandez was ahead by more than 45,000 votes with nearly 93 percent of Sunday's votes processed. He had 42.9 percent of the vote to Nasralla's 41.4 percent.
Opposition supporters protested throughout the day and into the night outside the electoral court's facilities and on major boulevards, setting up roadblocks and lighting bonfires in the streets. Hooded demonstrators threw rocks and pieces of wood at riot police carrying batons and shields, who responded forcefully with tear gas and water cannons as calls to maintain calm were increasingly unheeded.
David Matamoros, president of the electoral court, said Thursday that officials had not finished counting in part because overnight they had to evacuate after tear gas drifted into the building.
He said that about 2,000 electoral reports from polling sites contained "inconsistencies," including lacking signatures from members of the polling sites or not having seals. Those will most likely require a special count and it was unclear how many votes were at play in those cases, he said.
Representatives of the Organization of American States called for transparency in the count.
Honduras' influential Private Business Council urged the electoral court to wait until all the votes are counted before announcing the result.
Across the country, columns of smoke rose from tires set ablaze in the streets.
In Tegucigalpa, protesters and riot police faced off amid billowing clouds of gas. Officers with batons and tear gas closed two central boulevards, and water cannons were deployed for crowd control.
At least four people were admitted to the University School Hospital with injuries to the head and neck. Red Cross workers also attended to people in the streets, including one young protester bleeding profusely from the head. In the northern municipality of Santa Rita, police reported that two officers and a member of the military were injured by opposition protesters.
"We will be on guard all night," said Lastenia Figueroa, an office worker who took part in the demonstrations in Tegucigalpa.
The Public Safety Department warned that it would "peacefully clear out the protesters because they are blocking traffic." It reported more disturbances in at least eight cities besides the capital.
Many schools and universities in the capital announced they would be closed through the weekend to keep students out of harm's way. The Association of Banking Institutions recommended branches close Thursday afternoon in anticipation of street clashes.
Nasralla via Twitter asked his supporters to continue to protest peacefully and not be provoked into violence. Luis Zelaya, candidate for the Liberal Party, who was running a distant third in the tally, called for his supporters to "defend democracy."
Caritas de Honduras, the social service arm of the Catholic Church, scolded all parties Thursday for calling their supporters into the streets.
"That situation every day makes integration of society and the recovery of governability more distant," it said in a statement.
Former President Manuel Zelaya, whose Libre party was part of Nasralla's coalition, called for international observers to organize a public count of ballots to alleviate concerns of manipulation. He spoke on Honduras' Canal 5 television Thursday.
"That is a practical and definitive solution to exit the crisis Hernandez has gotten us into," said Zelaya, who was ousted from office in a coup orchestrated by Hernandez's National Party in 2009. He was accused of plotting to violate the constitution by seeking just the sort of re-election that Hernandez is trying for.
But the ruling National Party showed no sign of backing down. Party director Jesus Mejia told The Associated Press that with the remaining votes coming from rural areas, Hernandez would win by more than 50,000 votes.
Both candidates have declared themselves the winner. Late Wednesday, Nasralla disavowed an agreement he and Hernandez had signed with the Organization of American States to respect the official results.
"I signed that document before the electoral court's computing center went down, and that was a trap," Nasralla said at a news conference. "The agreement with the OAS was to respect trustworthy results without alterations ... and the court has altered the documents in the last two days. That is unacceptable."
Hernandez said he would respect the result and called for calm while the final votes were counted.
Matamoros said the computer problem was resolved and did not affect the vote.
Associated Press writer Christopher Sherman in Mexico City contributed to this report.
Copyright 2018 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.