Guinea-Bissau's historic ruling party on Monday signed a deal to form a coalition government after falling just short of a majority in parliamentary elections last week, political figures said.
According to the National Election Commission, the African Party for the Independence of Guinea and Cape Verde (PAIGC) won 47 of parliament's 102 seats and 46.1 percent of the popular vote.
Another 48 seats were taken by two opposition parties, with the final seven seats won by factions who last week agreed to back a PAIGC-led government.
A two-page document envisages an "inclusive" coalition government lasting the four years of the parliamentary term, with a focus on reform of the constitution and the security and public administration apparatus.
"There is no winner nor loser. What is important is to work together to get our country out of the crisis it has been going through for several years," said Mama Saliu Lamba of the APU-PDGB party which won five seats and is part of the planned coalition.
PAIGC head of the PAIGC, Domingos Simoes Pereira, said "the people made a choice on March 10 and have given us a mission."
"The signing of this agreement creates the conditions for a majority in parliament," he added.
The Supreme Court has yet to formally endorse the election results but President Jose Mario Vaz has already congratulated the PAIGC on the result.
It was hoped that the March 10 vote would draw a line under the crisis that erupted in August 2015 when Vaz -- also a PAIGC member -- sacked Pereira, his then prime minister.
The two men have had a very strained relationship since then and there had been fears the polls could have left the poor, volatile West African state heading into a fresh confrontation, analysts warned.
The PAIGC -- a one-time Marxist party which has run the country of two million people for most of the 45 years since independence from Portugal -- won the previous polls in 2014 with 57 seats.