Question: Information: - Mario Alberto Nobre Lopes Soares, , , (7 December 1924 7 January 2017) was a Portuguese politician who served as Prime Minister of Portugal from 1976 to 1978 and from 1983 to 1985, and subsequently as the 17th President of Portugal from 1986 to 1996. - The President of the Portuguese Republic is the executive head of state of Portugal. The powers, functions and duties of prior presidential offices, and their relation with the Prime Minister and cabinets has over time differed with the various Portuguese constitutions. - Prime Minister (Portuguese: "Primeiro-Ministro") is the current title of the head of government of Portugal. As head of government, the Prime Minister coordinates the actions of ministers, represents the Government of Portugal to the other bodies of state, is accountable to Parliament and keeps the President informed. The Prime Minister can hold the role of head of government with the portfolio of one or more ministries. - The Portuguese legislative election of 1979 took place on 2 December . The last election , three and a half years before , in April 1976 , was won by the Socialist Party under the lead of Mario Soares , who became the Prime - Minister of the 1st Constitutional government after the revolution . However , the government suffered several attacks and in December 1977 , Soares lost the voting of a confidence resolution because all the opposition , the Democratic and Social Center , the Social Democrats and the Communists united in order to vote against it , and so , the Soares ' government fell . Soares would become Prime - Minister again in January 1978 , in coalition with the Democratic Social Center , but in July this party would force the end of the government due to disagreements about agrarian reform . In August , Nobre da Costa became Prime - Minister by personal decision of the President of President Ramalho Eanes , after a failed attempt to unite the parties on the Parliament . However , the program of Nobre da Costa 's government was never approved and two months later , da Costa was replaced by Mota Pinto who would govern with extreme difficulties for less than one year . In July 1979 , the President finally decided to dissolve the Parliament and call for a new election for December . Mota Pinto was replaced in the period between the dissolution and the election by Maria de Lourdes Pintasilgo ( the only women to lead a government in Portugal ) . The right - wing parties , the Social Democratic , the Democratic and Social Center and the People 's Monarchist Party united in the Democratic Alliance ( Portuguese : Alianca Democratica or AD ) under the lead of Sa Carneiro won the election , receiving 43 % of the vote . The Socialists lost more than 30 MPs and the Communists , now allied with the Portuguese Democratic Movement in the United People Alliance achieved their highest total ever , with almost 20 % of the voting . What is the relationship between 'portuguese legislative election' and 'prime minister of portugal'?
Answer:
office contested