Austria’s Freedom Party was tasked with trying to form what could become the nation’s first far-right-led government since World War II, adding to the trend of anti-immigrant and populist parties gaining ground across Europe.

Austrian President Alexander Van der Bellen on Monday gave the leader of the party, Herbert Kickl, the chance to form a new coalition after previous attempts by other parties to forge a governing alliance without the far-right collapsed. On Saturday, Karl Nehammer, the country’s chancellor since late 2021, announced that he would resign.

The Freedom Party has already participated in governments but only as a junior partner. It ended first at a general election last year but since no party got more than 50% of the votes, two or more will need to link up to form a government.

If the talks fail, a new snap election is expected, with recent opinion polls suggesting that support for the Freedom Party has been on the rise.

“I may have certain wishes, but respect for the voters requires that I accept this majority,” Van der Bellen, a progressive who is one of the most trusted politicians in the country, said Monday after meeting with Kickl. “I did not take this step lightly.”

The political crisis in Austria reflects a broader European pattern: anti-immigrant and populist parties are gaining ground due to a large influx of migrants, sluggish economies and political instability. This surge in support is challenging mainstream politicians and making it harder to form stable governing coalitions across the continent.

Neighboring Germany prepares for elections in February where the nationalist, anti-immigration AfD party has been in ascendance and opinion polls place it on track to finish second in the vote. France has been grappling with political gridlock since Marine Le Pen’s National Rally performed strongly in the European parliamentary elections and in a general election in France last year.

Austria’s Freedom Party, which has been facing criticism over its pro-Russia stances, anti-Islam and anti-immigrant rhetoric and corruption scandals, won parliamentary elections in September by winning around 29% of the vote, topping its previous high of nearly 27% in 1999.

Following the election, though, Van der Bellen gave the mandate to form a government to Nehammer after his party, the center-right People’s Party, refused to join with the Freedom Party. Nehammer tried to form a coalition with the center-left Social Democrats and the liberal Neos party but those efforts ultimately collapsed in the early days of the new year. The People’s Party then signaled that it was open for discussions with Kickl.

According to recent opinion polls, the Freedom Party increased its support to around 36%, with the People’s Party a distant second with 21%.

Kickl, a former interior minister, has cut a divisive figure in the Alpine nation of around nine million. Known for his confrontational and often aggressive style, he has one of the lowest approval ratings among politicians.

Kickl’s meeting with the president on Monday was met with protest from hundreds, including Jewish students and political activists, who chanted “Nazis out” and held banners declaring, “We don’t want a right-wing extremist Austria.”

Write to Georgi Kantchev at georgi.kantchev@wsj.com