VIENNA (AP) — Austria's 31-year-old foreign minister declared victory for his party Sunday in a national election that set him up to become Europe's youngest leader and puts the country on course for a rightward turn.

Foreign Minister Sebastian Kurz claimed the win as final results announced by the Interior Ministry showed his People's Party had a comfortable lead with almost all the ballots counted.

Noting that his center-right party had triumphed over the rival Social Democrats only twice since the end of World War II, Kurz called it a "historic victory."

"Today is not the day of triumph over others, but today is our chance for real change in this country," he told cheering supporters.

Still to be counted are more than 800,000 absentee ballots and ones cast by voters outside of their home districts. The outstanding votes are due to be tallied by mid-week.

However, the votes counted so far show that Austria, where moderate policies have been the norm for decades, will have a government with a harder line on migration and Muslims than one running the country now.

Both Kurz's party and the right-wing Freedom Party — Kurz's most likely government coalition partner — campaigned on the need for tougher immigration controls, quickly deporting asylum-seekers whose requests are denied and cracking down on radical Islam.

Interior Minister Wolfgang Sobotka said the People's Party received 31.4 percent of the vote, a gain of more than 7 percentage points from the 2013 election. Kurz described that as the biggest jump in support in the party's history.

The Social Democratic Party of Austria, which now governs in coalition with People's Party, had 26.7 percent, while the Freedom Party had 27.4 percent.

The election returns suggest a harder line on immigration resonated with voters more strongly than Social Democratic calls for social equality. Social Democratic Chancellor Christian Kern acknowledged as much, saying Sunday's results reflected "a push to the right."

The Social Democrats were also hurt by charges of dirty campaigning after Israeli political adviser Tal Silberstein, while under contract to the party, launched Facebook platforms crudely mocking Kurz and suggesting the young foreign minister was anti-Semitic.

Much of the People's Party's appeal has been credited to Kurz. Since taking the helm in the spring amid growing strains within the governing Social Democratic-People's Party coalition, he moved his center-right party further to the right.

Even though he is part of the present government, Kurz also presented himself as an engine of change for voters disenchanted with the political status quo.

But he avoids the inflammatory rhetoric of the Freedom Party and its head, Heinz-Christian Strache. That made Kurz's party appealing to voters who were uncomfortable with the Freedom Party, but increasingly concerned about immigration since 2015, when hundreds of thousands of mostly Muslim migrants flowed into and through Austria in search of better lives in prosperous European Union nations

Strache has modified the tone of his message when speaking to the broader public. The party is keen on shedding its past links to anti-Semitism, but continues to attract a small neo-Nazi fringe.

The last time the Freedom Party was in government was 17 years ago. While no expects a repeat of the EU sanctions slapped on Austria because of the party's participation, critics of the Freedom Party in and outside Austria have expressed alarm at any government role for the euroskeptic party.

President Alexander Van der Bellen, who must swear in the new government, said he "puts great value on pro-European government." He narrowly defeated a Freedom Party candidate in last year's election for head of state.

With the pro-EU Kurz at the helm, "EU membership is not likely to be questioned," analyst Pepijn Bergsen, of the Economist Intelligence Unit said.

Among the greatest losers were Austria's Greens, with projections showing the party short of the 4 percent support needed to make it into parliament.

The environmentalist party, which had 12.42 percent in elections four years ago, was showing now at 3.9 percent.

Two other small parties, the liberal NEOS and the Liste Pilz led by a renegade former Greens politician, just cleared the threshold for parliament seats.