Police have detained about 400 leftists who were protesting against the national convention of the populist Alternative for Germany party in Stuttgart.

German news agency dpa reported that protesters were shouting "refugees can stay, Nazis must go," as some 2,000 party members arrived at the convention center on Saturday morning.

Protesters temporarily blocked a nearby highway and burned tires on another road leading to the convention center. Some 1,000 police officers were on the scene to prevent violent clashes between far right party members and demonstrators.

Alternative for Germany, or AfD, has been growing in political influence as it campaigns on an anti-refugee and anti-Islam platform.