Nicaragua’s Sandinista Party held presidential primaries on Saturday to choose a successor to long-time leader Daniel Ortega.
The event, held as tensions flared between the president and exiles, had been marred by a death threat to candidate Ortega Díaz for not pledging to end government attacks on opposition groups.
Ortega faces off against opposition candidate Daniel Cabrera, of the Conservative Party, in an election scheduled for 5 November.
He has said he will seek a record fifth term. But to remain in power he will need at least 43.4% of the vote.
Opposition groups have urged people to boycott the election, accusing Mr Ortega of imposing an “Ortegaism” in Nicaragua.
The BBC’s Steven Arons, in Managua, says attempts to unseat Mr Ortega have not been successful since he first won the presidency in 1984.
The former Marxist guerrilla leader, backed by the Sandinista National Liberation Front, has remained a popular figure, albeit increasingly tainted with allegations of corruption and repression.
The election on 5 November will be Nicaragua’s fourth since Mr Ortega and his wife, Rosario Murillo, assumed the role of president and vice-president respectively.
The vote has been called in the former communist country “a high-stakes charade” by critics.
The opponents say the election is organised “in breach of basic democratic norms”, says the BBC’s Peter Biles, in Nicaragua.
There is concern that government forces are behind recent attacks on opposition leaders, says Mr Biles.
Mr Ortega is facing domestic opposition and allegations of corruption and repression
Mr Ortega led a revolution against dictator Anastasio Somoza in 1979, returning to Nicaragua in 1990 as a triumphant figure.
He had to overcome huge criticism for his human rights record, and the Sandinistas were accused of some of the worst crimes committed by the right in the Cold War.
His return to power as president in 2007 was met with euphoria, particularly after successive elections during the previous decade had been judged to be free and fair.
But the country has faced repeated accusations of corruption and repression, particularly in the wake of a disputed referendum in 2016.
In the shadow of recent incidents, opposition candidate Daniel Cabrera told the BBC that his vote was not for “Ortegaismo” but the free will of the Nicaraguan people.
Nicaragua’s Independent Electoral Commission (CEIEC) on Friday said preliminary results of the vote would be published on 20 October.