Italian Prime Minister Giorgia Meloni believes that the "firewall" policy maintained by Germany's mainstream parties to keep the far-right Alternative for Germany (AfD) out of power is ineffective.

"As we can see, this is a strategy that does not work," the right-wing politician told the Italian newspaper Il Foglio in an interview published on Saturday.

Meloni was responding to a question about the anti-immigrant AfD's resounding victory in elections in the German state of Saxony-Anhalt last weekend.

All German mainstream parties have ruled out cooperating with the AfD under a policy known as the "firewall."

This means that the path to forming a government in Saxony-Anhalt is likely to be rocky for the AfD, even though it won a record 43.8% of the vote in Sunday's elections, falling just short of an absolute majority.

Domestic intelligence has classified the party's chapter in Saxony-Anhalt as far-right extremist.

Meloni noted that political movements "that focus on the defence of identity, the fight against mass illegal immigration and the danger of Islamization" have gained strength in Europe.

The reaction of the "establishment," Meloni said, has often been "to erect firewalls rather than addressing the substantive issues."

This strategy clearly does not work, she said, adding that "listening to these concerns and responding to them" was the more successful approach.

Meloni has been in power for just under four years, leading a coalition of three right-wing and conservative parties.

In the past, Meloni - who leads the Brothers of Italy party - has on several occasions distanced herself from the AfD and its political views.