Germany’s nationalist party, Alternative für Deutschland, has elected two new top candidates for the September general election after the party’s best-known politician, Frauke Petry, said last week she would no longer be available.

Members of the far-right party, known by its acronym AfD, elected Alexander Gauland and Alice Weidel at their weekend party convention in Cologne.

Divisions erupted among the different factions of the German nationalists as delegates from the AfD rejected an appeal on Saturday by Ms Petry to seek a more pragmatic political path instead of turning into a “fundamental opposition” party. The defeat was a significant blow for AfD co-leader Ms Petry, whose position in the party is now substantially weakened.

Mr Gauland, 76, is one of the party’s most prominent members and one of Ms Petry’s main rivals.

“We want to keep our home country, keep our identity, and we are proud to be German,” he said in his acceptance speech.

Ms Weidel, 38, is a consultant from southwestern Germany who has not stood in the spotlight of the four-year-old party so far.

“If we now stick together and fight together, then finally a true opposition party will be getting into German Parliament,” she told cheering delegates.

The party members also voted for an election manifesto that is harsh on immigration and Muslims and reiterates calls for leaving the European Union’s euro currency.

The head of the Central Council of Jews in Germany condemned the AfD’s further move to the far right, saying the party is trying to make “a chauvinist-nationalist way of thinking socially acceptable in Germany again”.

Josef Schu﻿ster warned that the party is “threatening Jewish and Muslim life in Germany.”

The conference in Cologne was overshadowed by massive protests on Saturday, when tens of thousands rallied against the populist party and blocked access to the hotel where the convention took place. The city remained relatively calm on Sunday and police reported only a few small demonstrations.

About 68 per cent voted for the duo, with 28 per cent voting against, the German news agency DPA reported.

AfD’s poll ratings soared amid the influx of migrants to Germany in late 2015 and early 2016. However, they have sagged in recent months as the issue faded from headlines and the party became increasingly mired in infighting, with Ms Petry and her husband Marcus Pretzell against other senior figures like Mr Gauland even further on the right.

Ms Petry, 41, announced on Wednesday that she would no longer be her party’s top candidate. She also irked some rivals by leading an effort to expel Björn Höcke, AfD’s regional leader in the eastern Thuringia state, after he suggested that Germany stops acknowledging and atoning for its Nazi past. Mr Gauland has repeatedly protected Mr Höcke, even after his remarks created an outrage in Germany.

German political parties choose lead candidates for elections who generally dominate their campaigns and, in the case of bigger parties, compete to become chancellor.

The country holds general elections on 24 September.