Guinea-Bissau's governing PAIGC party has said it will accept the result of the July presidential election victory, which it had previously disputed.
Mr Vieira first came to power in a coup in 1980
Last month, Joao Bernardo Vieira was confirmed as the election winner.
The PAIGC had insisted that its candidate, Malam Bacai Sanha, was the rightful winner, and appealed.
But on Tuesday, the party announced it was accepting the result. Mr Vieira, formerly a military ruler, is due to be sworn in on Saturday.
"The PAIGC has decided to recognise Nino [Mr Vieira's] victory," Roberto Ferreira, spokesman for the party's central committee, told a news conference.
Official results gave Mr Vieira 52% of the vote in a second round run-off, and the electoral commission rejected the PAICG's complaints.
Mr Vieira ruled Guinea-Bissau with an iron fist from 1980 until 1999, when he was overthrown in a bloody civil war.
Both candidates had previously promised to respect the outcome of the election, which European monitors said was "calm and organised".