Many voters have become disillusioned. Joana Pimenta, an architect who usually backs the Socialists, said she would not vote at all this time because of “a level of corruption that has even left our former prime minister in prison.” She said she had never missed voting in a national election before.

If she were forced to vote on Sunday, Ms. Pimenta said, it would probably be for Mr. Passos Coelho’s slate. “The austerity cuts have been horrible,” she said, “but at least he had the guts to face a problem and stick with it, however much hatred his policies generated.” Turnout is expected to be low by Portuguese standards.

“I think that people here now realize that to get back what has been invested to repair an economy, you need a certain amount of time,” said Jörg Heinermann, a German auto executive in Lisbon who heads the German-Portuguese Chamber of Commerce. “Portugal could become the proof that even a government that pushes through very tough austerity measures can win re-election.”

Mr. Passos Coelho is already the first Portuguese prime minister to lead a coalition through a full term in office since democracy was restored here in 1974 after four decades of dictatorship.

There have been setbacks along the way. Some of Mr. Passos Coelho’s economic proposals have been blocked in court. The government has struggled to find buyers for its planned privatizations, some of which have fallen behind schedule, or for a bank that the state rescued from the collapse of the Espírito Santo family’s business empire. Saving that bank ballooned the country’s 2014 budget deficit to 7.2 percent of gross domestic product, from a projected 4.5 percent.

If neither side emerges with a clear governing majority on Sunday, Portugal faces “the risk of medium-term deadlock,” according to a report by Antonio Barroso, an analyst in London for Teneo Intelligence, a research organization.

Mariana Mortágua, an economist and a leader of the Left Bloc party in Portugal, acknowledged that “it’s a problem that the left hasn’t been able to put forward one program and one solution.” In fact, she said, “the Socialist Party hasn’t offered people a credible alternative because they keep saying that they reject austerity, but at the same time they accept the fiscal rules of Europe, and don’t even talk about debt restructuring.”