VIENNA — The far-right Freedom Party of Austria filed a legal challenge on Wednesday over the results of the country’s presidential election, disputing the outcome of the May 22 runoff, in which the party’s candidate, Norbert Hofer, was narrowly defeated.

Officials said there was no precedent for a challenge to the outcome of a presidential election in the history of modern Austria, a federal republic that was reconstituted in 1945 from the ashes of Nazi Germany, which annexed the country in 1938.

The challenge, submitted by the party’s chairman to the Constitutional Court, injected an element of uncertainty into a debate that has already stirred questions over the strength of the far right in a nation with a fraught wartime past. Mr. Hofer led the first round of voting, on April 24, in which the country’s two mainstream parties were handed a humbling defeat.