(Adds doubts raised by election official, latest tally from election tribunal, details on protesters)
TEGUCIGALPA, Nov 30 (Reuters) - Honduran police fired tear gas at rock-hurling protesters on Thursday after a widely criticized presidential election that saw the opposition cry foul as the incumbent slowly pulled ahead four days after the vote.
Both President Juan Orlando Hernandez and his rival Salvador Nasralla, a television game show host allied with leftists, claimed victory after Sunday's election. The vote tally at first favored the challenger, but then swung in favor of the incumbent after hold-ups in the count, fueling talk of irregularities.
International concern has grown about the crisis sparked by the count in the Central American nation which in 2009 saw a military-backed coup. One of the four magistrates on the electoral tribunal flagged "serious doubts" about the process.
The Organization of American States (OAS) appeared to have salvaged the credibility of the election on Wednesday by eliciting signed statements from both candidates vowing to respect the final result once disputed votes had been checked.
But a few hours later, Nasralla, who initially held a five-point lead, rejected the OAS accord he had signed, saying his opponents were trying to rob him. He urged supporters to take to the streets of the capital Tegucigalpa to defend his triumph.
"They take us for idiots and want to steal our victory," said Nasralla, who heads a left-right coalition.
Marcos Ramiro Lobo, one of the four magistrates, called for an independent external auditor to review the results, but was non-committal on whether there was evidence of electoral fraud.
"We can't be sure of one thing or the other," Lobo told Reuters, expressing concern about the vote count breaking down. "What I do know is that serious doubts are being raised."
David Matamoros, who chairs the electoral tribunal, said he expected the count to conclude by mid-afternoon and that at an announcement could be made a couple of hours later.
Nasralla's followers heeded his call, with protests throughout the night across the country. In the city of La Ceiba, protesters set up barricades and burned tires across a bridge and blocked at least two other motorways.
With the stinging stench of purple-hued tear gas filling the air, dozens of youths shielded themselves with corrugated iron panels as they battled with Honduran security forces, who were guarding a vote-count center in capital city Tegucigalpa.
The fumes entered the building, prompting the evacuation of staff.
"We're going to keep protesting and won't let them steal this victory," 20-year-old university student Josue Valladares said on Thursday, as votes were being counted on the other side of a human wall of riot police.
"Hernandez should respect the popular will and hand over power," Valladares said.
Nasralla took to Twitter early Thursday to implore his followers to protest peacefully and not be "provoked by Hernandez's activists."
The sporadic way in which results have been published, and the reversal of Nasralla's lead have led to allegations that Hernandez may have influenced the tribunal.
The president has consolidated power in recent years and is the first one to seek a second term since a 1982 return to democracy in Honduras, which also suffers from widespread poverty, drug gangs and one of the world's highest murder rates.
Hernandez says the change in vote tendency reflects his support in rural areas, from where ballots were slower to arrive in the city.
On Monday, the tribunal published more than half the results, showing Nasralla with a five point lead, but then published nothing more for 36 hours.
When the count finally started again, Hernandez began to reel in Nasralla. The count has started and stopped ever since, with the tribunal blaming a delay Wednesday on computer glitches.
By Thursday afternoon, the tribunal's latest tally showed that with 91.18 percent of ballots counted, the center-right Hernandez had secured 42.74 percent of the vote, more than a one percentage point lead over Nasralla's 41.55 percent.
International observers said the delays were damaging the credibility of authorities, and risked undermining the winner's legitimacy. The U.S. State Department said the tribunal should be allowed to work without interference.
Ahead of the election, opinion polls indicated that Hernandez was favored to win the vote in the poor Central American country of more than 9 million people
Nasralla is one of Honduras' best-known faces and is backed by former President Manuel Zelaya, a leftist ousted in a coup in 2009 after he proposed a referendum on his re-election. (Editing by Simon Cameron-Moore and Bernadette Baum)