LA PAZ, Bolivia—President Evo Morales claimed victory in Bolivia’s disputed election and accused the opposition, which is demanding a runoff, of burning electoral offices, fomenting chaos and trying to overthrow his government.

“This is a coup d’état,” he said Wednesday in a nine-minute statement at the presidential palace in La Paz in his first public appearance since Sunday’s vote.

Shortly after he spoke, protesters, some draped in red, yellow and green Bolivian flags gathered in the capital’s downtown where they chanted slogans and accused the government of stealing the election.

“They are carrying out electoral fraud and people don’t like it,” said Sylvia Ayala, a pathologist at a state-run hospital. “Despite all the evidence, the government is declaring that it has won.”

Mr. Morales on Wednesday claimed he won by more than half a million votes and called on supporters to take to the streets to defend his victory which, if confirmed, would give the left-wing Aymara Indian a fourth consecutive term covering nearly 19 years.

Bolivia’s president, Evo Morales, speaking at the presidential palace in La Paz on Wednesday. Photo: Manuel Claure/Reuters

He also declared a state of emergency, without specifying what that would entail, and accused the opposition of conspiring with foreign agents to depose him, without providing evidence. “To the people of Bolivia, brothers and sisters, let’s organize, stand up, and defend democracy,” he said.

A mission of electoral observers headed by the Organization of American States on Wednesday urged Bolivian authorities to hold a runoff no matter what the final vote count is due to numerous irregularities in the first round. The OAS observers have expressed “deep concern and surprise at the drastic and hard-to-explain change in the trend of the preliminary results.”

Sunday’s presidential election was marred by the Supreme Electoral Tribunal’s sudden decision early that evening to stop publishing the preliminary results. At that point, with about 83% of the votes counted, Mr. Morales was short of the 10-point margin needed under law to avert a second-round runoff. He was about 7 points ahead of Carlos Mesa, his closest rival among eight opposition candidates.

A so-called quick count by an independent polling firm showed an even tighter race.

When the tribunal—whose members are appointed by the senate, currently held by Mr. Morales’s party—resumed publishing results almost 24 hours later, the incumbent’s lead jumped to nearly 10 points over Mr. Mesa.

As of Wednesday, with about 97% of the ballots counted, the official results showed Mr. Morales within striking distance of a first-round victory, with 46.6% of the votes compared with 36.8% for Mr. Mesa.

In his remarks to reporters Wednesday, Mr. Morales said he would respect the final results but also insisted that “we have already won.”

The tribunal’s vice president, Antonio Costas, stepped down in protest on Tuesday, saying in a resignation letter that interrupting the vote count was a “foolish” decision that had discredited the entire electoral process.

The tribunal didn’t respond to requests for comment.

An international election observer said everything was proceeding smoothly on election day, with results coming in faster than expected. When the vote count was suspended Sunday night, he said, the results clearly pointed toward a runoff.

Demonstrators take part in clashes in Santa Cruz, Bolivia, on Wednesday. Photo: Rodrigo Urzagasti/Reuters

Analysts say that Mr. Morales is desperate to avoid a second round of voting because nearly all polls indicate that he would lose in a head-to-head contest with Mr. Mesa, a centrist former president.

The government “is doing whatever it takes to win in the first round,” said Eduardo Gamarra, an expert on Latin American elections at Florida International University. “Only in fraudulent elections are trend lines changed after 80% of the vote has been counted.”

In recent days, angry protesters have burned five of the tribunal’s regional offices. That would likely make a recount or audit of the votes far more difficult, the observer said.

“This electoral process is rotten now,” the observer said. “There is no way to fix it.”

The turmoil was a reminder of political instability that has in the past convulsed Bolivia, where Mr. Morales, a 59-year-old former union leader, came to prominence leading protests against past governments. Mr. Morales was first inaugurated in 2006 and re-elected in 2009 and 2014 by landslides. He mixed market-oriented policies with revolutionary, anti-U.S. rhetoric to rule the country of 11 million.

Economic growth has exceeded 4% a year on average, and his government used the windfall from mineral and natural-gas exports to build roads and hospitals and lower poverty by half.

But dissatisfaction has grown with Mr. Morales and his Movement Toward Socialism party, which dominates all branches of government and controls much of the news media, according to press-freedom groups. When Bolivians in 2016 voted against Mr. Morales’s effort to amend the constitution so that he could run for a fourth term, judges allied with the government ruled that his candidacy could go forward.

On Wednesday, Mr. Mesa, the opposition candidate, said the president was growing increasingly authoritarian and dismissed his assertions that a coup against his government was under way.

“If there is anyone has systematically broken Bolivia’s constitutional order, that person’s name is Evo Morales,” he said.

—Ryan Dube in Buenos Aires contributed to this article.

Copyright ©2019 Dow Jones & Company, Inc. All Rights Reserved. 87990cbe856818d5eddac44c7b1cdeb8