During this period, Costa signed the controversial laws which expelled the Jesuits from Portugal, abolished all the religious orders and established the separation of church and state.
Also, he was instrumental in the passage of many progressive laws, such as those concerning divorce, family relations, civil registry of marriage, leases of property, judicial reorganization, industrial accidents and censorship of the press.
Following more political instability Costa was yet again Prime Minister, from 25 April 1917 to 8 December 1917, in a national-unity government nicknamed the Sacred Union, to support Portugal's entrance into World War I.
After the end of the war, Costa led the Portuguese delegation to the Paris Peace Conference from 12 March 1919 and he signed the Treaty of Versailles of 28 June 1919 on behalf of Portugal.
Costa was given up at birth as a foundling at the baby hatch of the Santa Casa da Misericórdia (Holy House of Mercy) of the town of Seia in north-central Portugal[citation needed].
Ten years later, his parents, Sebastião Fernandes da Costa and Ana Augusta Pereira, recognized him and his brother and sister.