Both the far-right Alternative fuer Deutschland and the far-left Die Linke saw significant gains and were the most popular parties among young people.