Outgoing Austrian President Heinz Fischer, stepping down after 12 years in office, spoke out against the right-wing politics of his potential successor Norbert Hofer on Friday.
In his farewell speech before parliament, the 77-year-old Social Democratic president issued a plea for Austrians to confront populism and xenophobia.
"Our refugee policy must be marked by rationality as well as humanity," he said.
"We Europeans are obliged to form a broad coalition against hatred and violence," he added.
Hofer, a senior Freedom Party legislator, lost the run-off election to former Green party chief Alexander Van der Bellen by less than 31,000 votes, but the election was marred by irregularities and will have to be repeated on October 2.
The populist Freedom Party has been lobbying for stricter immigration policies, and Hofer has said Austria should hold a referendum on its EU membership if the bloc's members decide to give more powers to Brussels.
"Austria must remain actively involved in the goals and values of Europe's policy of peace and economic cooperation," Fischer said.
The Constitutional Court annulled the result of the May run-off election last week.
The judges confirmed allegations by the Freedom Party that ballot papers were handled prematurely and without proper oversight, although they found no evidence of actual election fraud.
Until the rerun election on October 2 and the inauguration of the new head of state, the three presidents of Austria's parliament, including Hofer, will assume the duties of the president.
Fischer became president in 2004 and served for two six-year terms. He was previously science minister and a president of parliament.