Austria's Social Democrats are fighting to retain political control of Vienna against a resurgent far-right Freedom Party that could capitalize on fears about immigration and the economy.
Government of the capital city, a stronghold for decades for the Social Democrats and home to more than a fifth of Austria's 8.5 million people, is up for grabs in a regional election on Sunday.
Since early last month it has been the central hub through which tens of thousands of refugees and migrants have streamed, almost all of them crossing the country on their way to Germany.
The sudden arrival of crowds fleeing poverty and war in the Middle East and elsewhere prompted an outpouring of sympathy in the city. Many donated food and clothes at Vienna stations, large marches have been held in support of refugees, and the city handed out welcome leaflets to migrants saying "You are safe".
But Europe's migration crisis has also stirred unease about employment and housing, bolstering the Freedom Party and its leader, Heinz-Christian Strache, who is running for mayor. He has said a fence should be built around Austria to keep migrants out, much as Hungary has done on its southern border.
"We do not want to become a minority in our own country," Strache said at a party event on Tuesday, arguing the overwhelming majority of the migrants are not in fact refugees.
Michael Haeupl, the Social Democrat who has been mayor of Vienna for more than 20 years, has sought to shore up his defenses. His posters carry the phrase: "Now every vote counts!"
Polls suggest that is true - recent surveys have found that support for the Social Democrats, who have governed the city since World War II, is only slightly higher than the Freedom Party's, sometimes within the margin of error.
One of the most recent, by OGM for newspaper Kurier, found 37-38 percent of respondents supported the Social Democrats, while 33-34 percent backed the Freedom Party.
The survey of 793 people had a margin of error of 3.6 percentage points, and was carried out from Sept. 28 to Oct. 1. It showed the Greens on 12-13 percent and the centre-right People's Party at 9-10 percent, indicating a three-way coalition might be necessary. A liberal party, Neos, was on 5-6 percent.
Haeupl, the 66-year-old incumbent, currently in a coalition with the Greens, has another advantage in that all but one of the main parties, the People's Party, have ruled out an alliance with the Freedom Party, suggesting it would be unable to govern.
But even a strong second-place showing would be a coup for Strache, 20 years Haeupl's junior. He appears poised to lead his party to its best result in Vienna - its record, 28 percent, was achieved in 1996.
Support for the far-right party has been rallying for years, helped by dissatisfaction with the Social Democrats and the People's Party, which have been in a national coalition under Chancellor Werner Faymann since late 2008.
Austria also had one of the highest rates of asylum seekers in the European Union even before the latest wave of migrants arrived last month. The issue has dominated recent campaigns.
"Would a man leave his wife and his children in the lurch if the family truly was in danger?" Strache said on Tuesday, adding most migrants were young men.
The migration crisis plays into the hands of the Freedom Party, or FPO, political analyst Peter Filzmaier said.
"It is, however, not simply the case that more people vote FPO because of that," he said, referring to the Freedom Party. "It is in conjunction with economic and social worries about the future," he added.
Forced onto the defensive on migration, Haeupl has sought to put the numbers in perspective.
"I understand these concerns," Haeupl said in a televised debate with the main parties' leading candidates, adding that only 5 percent of recent arrivals had applied for asylum instead of continuing into Germany.
"We can manage," he said.