The former head of military intelligence in Guinea-Bissau has been shot dead by uniformed men, just hours after polls closed in the unstable country, officials say.
Col Samba Djalo was shot in a restaurant opposite his home in the capital, Bissau, witnesses say.
It is not clear why he was shot but he was previously linked to a 2009 bombing which killed the then army chief.
The election follows the death in January of President Malam Bacai Sanha.
Guinea-Bissau has experienced numerous army mutinies and coup plots since independence from Portugal in 1975.
In recent years, it has become a major drugs trafficking hub as gangs have taken advantage of its instability and poverty to use it to smuggle cocaine from Latin America to Europe.
The electoral commission head and army spokesman have vowed that the shooting of Col Djalo will not derail the election.
A police source told the AFP news agency that five shots had been fired at Col Djalo.
The colonel was jailed for eight months in 2010 over the 2009 bomb attack which killed army chief Gen Batista Tagme Na Wai.
Hours after that attack, President Joao Bernardo Vieira was assassinated by mutinous soldiers. Mr Sanha was elected president later that year.
Despite the shooting, the atmosphere on the streets and at the army headquarters appears calm and relaxed, the BBC's John James in Bissau says, as votes from Sunday's election continue to be counted and collated.
Nine candidates are running for office, but analysts say only four have a realistic chance.
The front runner is Carlos Gomes Junior, 60, who has stepped down as prime minister to run as candidate for the governing African Party for the Independence of Guinea and Cape Verde (PAIGC).
The three other candidates expected to do well are Kumba Yala, who was president from 2000 to 2003; MP Manuel Serifo Nhamadjo and former businessman Henrique Rosa.
A candidate needs more than 50% of the vote to be declared the winner; otherwise a second round will be needed.
Election observers said it appeared that people had voted freely and that the election had been well organised.
Air, sea and land borders were closed for the day and only election commission-authorised vehicles were allowed on the roads.