Local elections were held in Portugal on 1 October 2017. The elections consisted of three separate elections in the 308 Portuguese municipalities, the election for the Municipal Chambers, another election for the Municipal Assembly, as well an election for the lower-level Parish Assembly, whose winner is elected parish president. This last election was held in the more than 3,000 parishes around the country. In the 2017 election, 13.3 percent of incumbent mayors, 41 to be precise, were barred from running for another term.

The Socialist Party (PS) was the big winner of the elections consolidating their position as the largest local party in Portugal. The PS won 160 mayors, 10 more than in 2013, and more than 38 percent of the votes. The Socialists maintained control in cities like Lisbon, although here they lost their majority, Funchal and Coimbra, at the same time they gained some strong PSD bastions like Chaves or Mirandela. Nonetheless, the PS lost one of their bastions, Vila do Conde, to an independent. The strong nationwide results for the PS helped to legitimize António Costa's position as Prime Minister after his loss in the 2015 general elections. It was also the first time since 1985, that the party in government clearly won a nationwide local election.

The Social Democrats (PSD) were one of the big losers of the elections. They lost 8 cities in comparison to 2013, although, in term of votes won, they got basically the same number compared to 2013. The PSD achieved very bad results in Lisbon and Porto, polling third and below 15 percent of the votes. The worse than expected results led Pedro Passos Coelho to question, on election night, if he had the political ground to continue as leader of the party. Two days later, on October 3, Passos Coelho announced he would not stand for another term as PSD leader.

The CDU was also one of the big losers of the election. The Communist-Green alliance resumed its decline, losing 10 cities, 9 to the PS and 1 to an independent, and polling below 10% of the votes. The coalition lost strong bastions in Setúbal district like Almada and Barreiro and wasn't able to hold on to Beja. On the flip side, CDS – People's Party had a very strong performance, especially in Lisbon. Assunção Cristas, CDS leader and candidate for Lisbon mayor, polled second and won 21 percent of the votes, 10 points ahead of the PSD. In the country as a whole, the CDS was able to gain one municipality from the PSD, Oliveira do Bairro, and managed to retain the other 5 cities it won in 2013.

Independent movements also increased their scores compared to 2013. A total 17 independent candidates gained or maintained control in their respective cities, especially Rui Moreira, mayor of Porto, as he was able to win re-election with a majority. Smaller parties also made gains: Livre, in coalition with the PS, gained Felgueiras from the PSD, We, the Citizens! won Oliveira de Frades from a PSD/CDS coalition and JPP maintained control of Santa Cruz in the Madeira islands.

Turnout in these elections increased compared with four years ago, with 55.0 percent of voters casting a ballot.

Background Electoral system

All 308 municipalities are allocated a certain number of councilors to elect corresponding to the number of registered voters in a given municipality. Each party or coalition must present a list of candidates. The winner of the most voted list for the municipal council is automatically elected mayor, similar to first-past-the-post (FPTP). The lists are closed and the seats in each municipality are apportioned according to the D'Hondt method. Unlike in national legislative elections, independent lists are allowed to run.

Council seats and Parish assembly seats are distributed as follows:

+ Seat allocation for the 2017 local election Councilors Parish Assembly Seats Voters Seats Voters 17 only Lisbon 21 more than 40,000 voters 13 only Porto 19 more than 20,000 voters 11 100,000 voters or more 13 more than 5,000 voters 9 more than 50,000 voters 9 more than 1,000 voters 7 more than 10,000 voters 7 1,000 voters or less 5 10,000 voters or less

For parishes with more than 30,000 voters, the number of seats mentioned above is increased in one per 10,000 voters beyond that number (if, by applying this rule the result is even, the number of seats is increased in one more.

By-elections (2013–2017) During the normal four-year term of local governments, one municipal council by-election was held in the municipality of São João da Madeira on 24 January 2016, after the resignation of the local government and mayor, under a PSD minority, claiming a lack of conditions to govern due to the opposition's blockade. The by-election results gave the PSD/CDS–PP coalition a majority of 4 councillors and nearly 45% of the votes, while the PS held on to their 3 councillors and nearly 38% of the votes; Other parties and lists all polled below 7%. Adding to this, fifteen parishes also held a by-election for parish assemblies.

+City control in by-elections (2013–2017)Date Municipality Population Previous control New control24 January 2016São João da Madeira21,713Social Democratic Party (PSD)PSD / CDS–PP Parties The main political forces that contested the election were:

Left Bloc (BE) CDS – People's Party (CDS–PP) (only in some municipalities)1 Unitary Democratic Coalition (CDU) Together for the People (JPP) People–Animals–Nature (PAN) Socialist Party (PS) Social Democratic Party (PSD) (only in some municipalities)1

1 The PSD and the CDS–PP also formed coalitions in several municipalities with the Earth Party (MPT) and the People's Monarchist Party (PPM).

Opinion polls

Voter turnout The table below shows voter turnout throughout election day.

Turnout Time 12:00 16:00 19:00 2013 2017 ± 2013 2017 ± 2013 2017 ± Total 19.44% 22.05% 2.61 pp 43.43% 44.39% 0.96 pp 52.60% 54.96% 2.36 pp Sources

Results

Municipal Councils

National summary of votes and seats

! rowspan="2" colspan=2 style="background-color:#E9E9E9" align=left|Parties ! rowspan="2" style="background-color:#E9E9E9" align=right|Votes ! rowspan="2" style="background-color:#E9E9E9" align=right|% ! rowspan="2" style="background-color:#E9E9E9" align=right|±pp swing ! rowspan="2" style="background-color:#E9E9E9" align=right|Candidacies ! colspan="2" style="background-color:#E9E9E9" align="center"|Councillors ! colspan="2" style="background-color:#E9E9E9" align="center"|Mayors |- style="background-color:#E9E9E9" ! style="background-color:#E9E9E9" align="center"|Total ! style="background-color:#E9E9E9" align="center"|± ! style="background-color:#E9E9E9" align="center"|Total ! style="background-color:#E9E9E9" align="center"|±

|1,956,682||37.82||1.5||296||952||29||159||10

|831,555||16.07||0.6||190||493||38||79||7

|489,083||9.45||1.6||303||171||42||24||10 |- |style="width: 10px" bgcolor=#FF9900 align="center" | |align=left|Social Democratic / People's |454,222||8.78||1.2||73||169||15||16||0 |- |style="width: 8px" bgcolor=gray align="center" | |align=left|Independents |351,352||6.79||0.1||87||130||18||17||4

|170,040||3.29||0.9||124||12||4||0||0

|134,257||2.60||0.4||113||41||6||6||1 |- |style="width: 9px" bgcolor=#FF9900 align="center" | |align=left|PSD / CDS–PP / MPT / PPM |88,541||1.71||1.2||11||23||9||1||0 |- |style="width: 9px" bgcolor=#FF9900 align="center" | |align=left|PSD / CDS–PP / PPM |75,192||1.45||0.4||4||15||6||2||0

|style="width: 8px" bgcolor=#0093DD align="center" | |align=left|CDS–PP / MPT / PPM |57,570||1.11||0.9||13||4||3||0||0

|55,921||1.08||0.8||31||0||0||0||0 |- |style="width: 9px" bgcolor=#FF9900 align="center" | |align=left|PSD / PPM |46,822||0.91||0.4||4||8||13||0||1 |- |style="width: 9px" bgcolor=#FF9900 align="center" | |align=left|PSD / CDS–PP / MPT / PPM / PPV-CDC |36,452||0.70||—||1||5||—||0||—

|style="width: 9px" bgcolor=#FF66FF align="center" | |align=left|Socialist / Together for the People |23,634||0.46||—||1||5||—||0||— |- |style="width: 9px" bgcolor=#FF66FF align="center" | |align=left|PS / BE / JPP / PDR / NC |23.577||0.46||0.1||1||6||1||1||0 |- |style="width: 9px" bgcolor=#FF9900 align="center" | |align=left|Social Democratic / Earth |19,556||0.38||0.4||4||5||2||0||0 |- |style="width: 9px" bgcolor= align="center" | |align=left|LIVRE / Socialist |16,409 ||0.32||—||1||5||—||1||— |- |style="width: 9px" bgcolor=green align="center" | |align=left|Together for the People |14,818 ||0.29||—||5||6||—||1||— |- |style="width: 9px" bgcolor=gold align="center" | |align=left|We, the Citizens! |12,497 ||0.24||—||12||5||—||1||—

|12,387||0.24||0.3||18||0||0||0||0 |- |style="width: 9px" bgcolor=#FF9900 align="center" | |align=left|PSD / CDS–PP / MPT |12,128 ||0.23||1.8||6||7||4||0||0

|style="width: 8px" bgcolor=#0093DD align="center" | |align=left|People's / People's Monarchist |10,286||0.20||—||12||4||—||0||— |- |style="width: 10px" bgcolor=#CC0033 align="center" | |align=left|Labour |5,681||0.11||0.1||26||0||0||0||0 |- |style="width: 9px" bgcolor=#0093DD align="center" | |align=left|CDS–PP / PSD/ MPT / PPM |4,862||0.09||—||1||2||—||0||—

|4,744||0.09||0.0||13||0||0||0||0 |- |style="width: 9px" bgcolor=black align="center" | |align=left|PDR / Together for the People |3,643||0.07||—||4||0||—||0||—

|3,370||0.07||0.0||13||0||2||0||0 |- |style="width: 9px" bgcolor=#FF9900 align="center" | |align=left|Social Democratic / We, the Citizens! |2,948||0.06||—||1||2||—||0||— |- |style="width: 9px" bgcolor=black align="center" | |align=left|Democratic Republican |2,793||0.05||—||10||0||—||0||— |- |style="width: 9px" bgcolor=#0093DD align="center" | |align=left|People's / We, the Citizens! |2,547||0.05||—||2||0||—||0||— |- |style="width: 8px" bgcolor=#0093DD align="center" | |align=left|People's / Social Democratic |2,287||0.04||0.1||4||2||2||0||0 |- |style="width: 9px" bgcolor=#013220 align="center" | |align=left|Earth / PPV-CDC |2,258||0.04||—||1||0||—||0||— |- |style="width: 9px" bgcolor=#FF9900 align="center" | |align=left|PSD / PPM / MPT |1,958||0.04||0.9||1||2||5||0||0 |- |style="width: 8px" bgcolor=#0093DD align="center" | |align=left|People's / Earth |1,568||0.03||0.1||4||0||0||0||0 |- |style="width: 9px" bgcolor=#005FAD align="center" | |align=left|PPM / PURP |1,330||0.03||—||1||0||—||0||— |- |style="width: 9px" bgcolor= align="center" | |align=left|LIVRE |1,008 ||0.02||—||3||0||—||0||— |- |style="width: 9px" bgcolor=crimson align="center" | |align=left|Socialist Alternative Movement |943||0.02||—||1||0||—||0||— |- |style="width: 9px" bgcolor=yellow align="center" | |align=left|United Party of Retirees and Pensioners |760||0.02||—||2||0||—||0||— |- |style="width: 9px" bgcolor=#0093DD align="center" | |align=left|CDS–PP / NC / PPM |661||0.01||—||2||0||—||0||— |- |style="width: 9px" bgcolor==#000080 align="center" | |align=left|PPV-CDC / PPM |470||0.01||—||1||0||—||0||—

|364||0.01||0.0||2||0||0||0||0 |- |style="width: 9px" bgcolor==#000080 align="center" | |align=left|Citizenship and Christian Democracy |186||0.00||—||1||0||—||0||— |- |style="width: 8px" bgcolor=#0093DD align="center" | |align=left|CDS–PP / PSD / PPM |146||0.00||—||1||0||—||0||— |- |colspan=2 align=left style="background-color:#E9E9E9"|Total valid |width="65" align="right" style="background-color:#E9E9E9"|4,937,508 |width="40" align="right" style="background-color:#E9E9E9"|95.45 |width="40" align="right" style="background-color:#E9E9E9"|2.3 |width="40" align="right" style="background-color:#E9E9E9"|— |width="45" align="right" style="background-color:#E9E9E9"|2,074 |width="45" align="right" style="background-color:#E9E9E9"|12 |width="45" align="right" style="background-color:#E9E9E9"|308 |width="45" align="right" style="background-color:#E9E9E9"|0 |- |colspan=2|Blank ballots |135,785||2.62||1.3||colspan=5 rowspan=4| |- |colspan=2|Invalid ballots |99,734 ||1.93||1.0 |- |colspan=2 align=left style="background-color:#E9E9E9"|Total