Austria's centrist government, shaken by a far-right near-victory in an election for president, pledged Tuesday to take measures on asylum for migrants and to boost security in an effort to win back voters.

Europe's political establishment, challenged in many countries by resurgent populist and anti-immigration parties, breathed a sigh of relief Monday when postal ballots swung the election in favor of an environmentalist in a dramatic photo finish.

The far-right Freedom Party candidate, Norbert Hofer, lost to Alexander Van der Bellen by less than 1 percentage point — a record performance for the party and a watershed for its allies across Europe. A win would have made him the first far-right head of state in the European Union.