Pedro Passos Coelho | Patricia De Melo Moreira/AFP via Getty Images Portugal’s opposition leader steps down after election defeat Ex-PM Pedro Passos Coelho to go in December.

LISBON — Portugal’s former Prime Minister Pedro Passos Coelho announced Tuesday he was stepping down as leader of Portugal’s main center-right opposition party, following its drubbing at the hands of the governing Socialists in local elections.

“This result gives me no room to maneuver,” Passos Coelho told a news conference after a meeting of the national council of his Social Democratic Party (PSD). “We have to find a new path for the future.”

He acknowledged Sunday’s result was the worst ever for the Social Democrats. They fell to a humiliating third place in Lisbon and Porto, won mayoral office in only two of the country’s 15 most populous cities and captured just 98 out of 308 city halls.

Passos Coelho will stay on until the party picks a new leader early December.

Whoever takes over will face the task of overcoming the legacy of unpopularity associated with the austerity policies followed by Passos Coelho as prime minister from 2011 to 2015.

Although his strict application of measures to reduce the budget deficit in line with eurozone demands are credited by some with saving the economy from collapse during the darkest days of the European debt crisis, they are also widely blamed for record levels of unemployment, falling living standards and widespread hardship.

By late 2015, however, the economy was slowly beginning to pick up. Passos Coelho’s center-right coalition actually came first in the parliamentary election held in October that year. Then he was outflanked by Socialist leader António Costa, who formed a minority government with the backing of the Portuguese Communist Party and the radical Left Bloc.

With Costa as prime minister, the economy soared, with growth expected to hit 3 percent this year, unemployment falling, and exports and tourism booming.

Passos Coelho remained fatally associated in the minds of many voters with the grim austerity era. Sunday’s election showed the party’s power-brokers the PSD had to change to survive.

“His time is up,” Ângelo Correia, an influential PSD insider, told Antena 1 radio Tuesday.

Leading the race to take over as opposition leader is Rui Rio, 60, a party veteran who served as mayor of Porto from 2001 to 2013. Outside the national government, he’s less sullied with the taint of austerity.

He’s likely to face younger challengers, including Paulo Rangel, 49, a member of the European Parliament; Luís Montenegro, 44, the Social Democrats’ deputy parliamentary leader who is close to Passos Coelho; and party Vice President Marco António Costa, 50 (no relation to the prime minister).

Another veteran, Pedro Santana Lopes, who had an unhappy seven-month stint as prime minister in 2005, was reported to be pondering a comeback.

Riding high in the polls, Prime Minister Costa can, for now, sit back and watch the maneuvering in the opposition. But the PSD’s next leader could present him with a bigger challenge than the unpopular Passos Coelho.

Costa also faces the prospect of discomfort on the left, with signs the Communists and Left Bloc are taking a harder line with the government following their disappointing showing in Sunday’s election.