Few could have forecast how events have unfolded in Portugal over the past 18 months. In a general election in October 2015, António Costa, leader of the centre-left Socialist Party (PS), lost to the centre-right coalition that had steered the country through a painful international bailout, yet succeeded in depriving the government parties of their overall majority in parliament.
In the ensuing weeks of political disarray, Mr Costa put together an alliance with the radical Left Bloc (BE) and old-guard Communist Party (PCP), who agreed to provide parliamentary support for a minority PS government dedicated to reversing austerity measures introduced as part of a 2011-14 adjustment programme overseen by the EU and the International Monetary Fund (IMF).