They are appointed by the president of the Republic, after the legislative elections and after an audience with every leader of a party represented at the Assembly.
The origins of present office of prime minister of Portugal fall back to the beginning of the Portuguese monarchy in the 12th century.
Typically, a senior official of the king of Portugal prevailed over the others, ensuring the coordination of the administration of the kingdom as a kind of prime minister.
With the beginning of the Constitutional Monarchy, the office of President of the Council of Ministers (Presidente do Conselho de Ministros) was created.
With the advent of the Republic in the 5 October 1910 revolution, the head of government was renamed President of the Ministry (Presidente do Ministério).
During this period the heads of government were under the strong power of the parliament and often fell due to parliamentary turmoils and social instability.