LA PAZ, Bolivia — President Evo Morales of Bolivia on Sunday appeared to fall short of outright victory in his quest for a fourth consecutive term, giving the opposition a viable chance to defeat him in a December runoff.

Mr. Morales, a firebrand leftist who made history in 2006 when he became the country’s first indigenous leader, failed to secure the 10-point margin of victory he needed to avoid a runoff.

The incumbent had 45 percent of the vote, election officials announced shortly after 8 p.m., with most of the ballots counted. His opponent, Carlos Mesa, a former president, trailed with 38 percent.

Mr. Mesa, 66, called the outcome a “triumph” as he addressed euphoric supporters in La Paz and called on voters who picked other opposition candidates to support him.