Bolivian President Evo Morales speaks to supporters at the presidential palace in La Paz, Bolivia, after a first round presidential election, Sunday, Oct. 20, 2019. Morales led in early returns from the first round of Sunday’s presidential election, but he appeared headed to a runoff in the tightest political race of his life. (AP Photo/Jorge Saenz)

LA PAZ, Bolivia (AP) — President Evo Morales led in early returns from the first round of Sunday's presidential election, but he appeared to have failed to get enough votes to avoid a runoff in the tightest political race of his life.

The Andean country's top electoral authority said Sunday night that a preliminary count of 84% of the votes showed Morales on top with 45.3%, followed by 38.2% for his closest rival, former President Carlos Mesa. If the results hold, the two men will face off in December and Morales could be vulnerable to a united opposition in the first runoff in his nearly 14 years in power.

Mesa told supporters shortly after the first results were announced that his coalition had scored "an unquestionable triumph," and he urged others parties to join him for a "definitive triumph" in the second round.

Morales claimed a victory for himself, saying that "the people have again imposed their will."

"We are not alone. That is why we have won again," he told supporters at the presidential palace.

To avoid a runoff and win outright, Morales would have needed to get 50% of the votes plus one or have 40% and finish 10 percentage points ahead of the nearest challenger.

Morales came to prominence leading social protests in the landlocked country of 11 million people and rose to power as Bolivia's first indigenous president in 2006. The 59-year-old leftist is South America's longest-serving leader.

Mesa is a 66-year-old historian who as vice president rose to Bolivia's top office when his predecessor resigned the presidency in 2003 amid widespread protests. Mesa then stepped aside himself in 2005 amid renewed demonstrations led by Morales, who was then leader of the coca growers union.

Voting, which was mandatory, was mostly calm, though police said they arrested more than 100 people for violating the country's rigid election-day rules against drinking, large gatherings or casual driving. In a surprise result, Chi Hyun Chung, a physician and evangelical pastor of South Korean ancestry, was in third with 8.8% of the vote.

Bolivians also elected all 166 congressional seats. Morales' Movement Toward Socialism party lost seats although it retained a majority in Congress.

Morales voted early in the coca-growing region of El Chapare, where residents threw flower petals at him and he said he remained confident of his chances.

In his years in office, he allied himself with a leftist bloc of Latin American leaders and used revenues from the Andean country's natural gas and minerals to redistribute wealth among the masses and lift millions out of poverty in the region's poorest country. The economy has grown by an annual average of about 4.5%, well above the regional average.

Morales, the son of Aymara Indian shepherds, has also been credited for battling racial inequalities.

Many Bolivians, such as vendor Celestino Aguirre still identify with "Evo," as he's widely known, saying people shouldn't criticize him so much. "It's not against Evo, it's against me, against the poor people, against the humble."

But Morales also has faced growing dissatisfaction even among his indigenous supporters. Some are frustrated by corruption scandals linked to his administration — though not Morales himself — and many by his refusal to accept a referendum on limiting presidential terms. While Bolivians voted to maintain term limits in 2016, the country's top court, which is seen by critics as friendly to the president, ruled that limits would violate Morales' political rights as a citizen.

"I'm thinking of a real change because I think that Evo Morales has done what he had to do and should leave by the front door," said Nicolás Choque, a car washer.

Mauricio Parra, who administers a building in downtown La Paz, said he voted for Morales in 2006 as a reaction against previous center-right governments, but this time, he voted for Mesa.

Morales "did very well those four years. ... (But) in his second term there were problems of corruption, drug trafficking, nepotism and other strange things," Parra said, saying that led him to vote against repealing term limits in the 2016 referendum. "He hasn't respected that. That is the principle reason that I'm not going to vote for Evo Morales."

"A runoff will be a heart-stopping finish," Bolivian political analyst Franklin Pareja said ahead of the results. "It would break with the myth that it's hard to beat Evo Morales."

A supporter of Bolivian President Evo Morales shows his support outside the presidential palace in La Paz, Bolivia, after a first round presidential election, Sunday, Oct. 20, 2019. According to official early returns, Morales is in the lead but appears headed to a December runoff against former President Carlos Mesa. (AP Photo/Juan Karita)
Opposition candidate Carlos Mesa waves to supporters, accompanied by his wife Elvira Salinas, after the first round presidential election in La Paz, Bolivia, Sunday, Oct. 20, 2019.Mesa will face President Evo Morales in a December election runoff. (AP Photo/Juan Karita)
CORRECTS COUNTRY -  Electoral officials count ballots after polls closed for presidential elections in La Paz, Bolivia, Sunday, Oct. 20, 2019. Polls closed after a calm election as President Evo Morales sought an unprecedented fourth term in what was regarded as the tightest race of his political career. (AP Photo/Jorge Saenz)
Bolivia's President Evo Morales greets followers before casting his vote in Villa 14 de Septiembre, in the Chapare region, Bolivia, Sunday, Oct. 20, 2019. Bolivians are voting in general elections Sunday where Morales is Presidential candidate for a fourth term.(AP Photo/Juan Karita)
Opposition presidential candidate Carlos Mesa waves after voting during general elections in Mallasilla, in the outskirts of La Paz, Bolivia, Sunday, Oct. 20, 2019. Former president Mesa is the closest rival to President Evo Morales, who is seeking a fourth term in the country's general elections. (AP Photo/Jorge Saenz)
A woman casts her vote in Villa 14 de Septiembre, in the Chapare region, Bolivia, Sunday, Oct. 20, 2019. Bolivians are voting in general elections Sunday where Bolivia's President Evo Morales is candidate for a fourth term. (AP Photo/Juan Karita)
A woman signs on a voters record after voting at a polling station during general elections in La Paz outskirts, Bolivia, Sunday, Oct. 20, 2019. Bolivians are voting in general elections Sunday where President Evo Morales is Presidential candidate for a fourth term. (AP Photo/Jorge Saenz)
A woman carries her child on her back as she stands in line to vote at a polling station during general elections in La Paz outskirts, Bolivia, Sunday, Oct. 20, 2019. Bolivians are voting in general elections Sunday where President Evo Morales is Presidential candidate for a fourth term. (AP Photo/Jorge Saenz)
Military police guard the polling station where Bolivia's President Evo Morales will cast his vote as a man sits with a bag of coca leaves in Villa 14 de Septiembre, in the Chapare region, Bolivia, Sunday, Oct. 20, 2019. Bolivians are voting in general elections Sunday where Morales is Presidential candidate for a fourth term. (AP Photo/Juan Karita)
Women sit outside a polling station during general elections in La Paz outskirts, Bolivia, Sunday, Oct. 20, 2019. Bolivians are voting in general elections Sunday where President Evo Morales is Presidential candidate for a fourth term. (AP Photo/Jorge Saenz)
In this Oct. 13, 2019 photo, car washer Nicolas Choque poses for a portrait in La Paz, Bolivia.
Bolivia's President Evo Morales waves to members of the press as he visits a trout farm where he stopped to eat in Incachaca, Bolivia, Saturday, Oct. 19, 2019. Morales is seeking a fourth term in Sunday's general elections. (AP Photo/Juan Karita)
Bolivia's President Evo Morales, center, greets supporters during a visit to a trout farm where he stopped to eat, in Incachaca, Bolivia, Saturday, Oct. 19, 2019. Morales is seeking a fourth term in Sunday's general elections. (AP Photo/Juan Karita)
Opposition presidential candidate Carlos Mesa gives a thumbs up after voting during general elections in Mallasilla, in the outskirts of La Paz, Bolivia, Sunday, Oct. 20, 2019. Former president Mesa is the closest rival to President Evo Morales, who is seeking a fourth term in the country's general elections. (AP Photo/Jorge Saenz)
Opposition presidential candidate Carlos Mesa waves before voting during general elections in Mallasilla, in the outskirts of La Paz, Bolivia, Sunday, Oct. 20, 2019. Former president Mesa is the closest rival to President Evo Morales, who is seeking a fourth term in the country's general elections. (AP Photo/Jorge Saenz)