A German party set for big gains in upcoming European elections suffered another setback on Thursday when it was expelled from a right-wing group in the European Parliament.

The Identity and Democracy group decided to expel Alternative for Germany (AfD) from the group with immediate effect, the Italian La Lega party, a member of the group, said in a statement.

Thursday’s expulsion exposed deep rifts within the far right across the 27-nation bloc little more than two weeks ahead of elections in which they were supposed to surge.

It was not immediately clear what effect the expulsion would have on AfD but a swing to the right could raise questions about the bloc’s future direction in issues from climate protection and immigration to support for Ukraine.

AfD acknowledged Thursday’s decision.

“Nevertheless, we are optimistic about the election evening and the days to follow,” co-leaders Alice Weidel and Tino Chrupalla said in a statement.

The statement added that AfD leaders were “confident that we will continue to have reliable partners at our side in the new legislative period”.

They did not indicate who they could team up with ahead of the vote.

The move comes amid growing controversy surrounding AfD’s lead candidate for the European election, Maximilan Krah.

On Wednesday, the party barred Mr Krah from making any further campaign appearances after he told an Italian newspaper that not all members of the Nazis’ elite SS unit, which was involved in major war crimes during the Second World War, were war criminals.

Mr Krah had already been under scrutiny after authorities in Brussels searched his offices at the European Parliament in connection with one of his assistants who was arrested last month on suspicion of spying for China.