An upstart band of internet freedom activists are to enter Berlin's state parliament, ousting the Free Democrats, Angela Merkel's junior partner in the unpopular national government. It marks a remarkable success for the small Pirate party, which attracted 8.5% of the vote, winning its first ever seats in a state parliament, according to the first exit polls on Sunday.

Their irreverent campaign captured the imagination of young voters as the party expanded its platform from an original focus on filesharing, censorship and data protection, to include social issues and citizens' rights. The party, which was founded in 2006, was "in tune with the Berlin vibe with their relaxed campaign", Holger Liljeberg of the Info polling institute, told Reuters. "They focus a lot on liberalism, freedom and self-determination."

Once opinion pollsters began to predict that they might overcome the crucial 5% hurdle to get into parliament, the momentum behind the Pirates began to grow, with supporters no longer worrying that a vote for them would be wasted.

The result is not the first European success for the Pirates. The original Swedish version of the party won a seat in the European parliament in 2009 after capturing just over 7% of the vote. Support for the party had soared after the jailing of the four founders of the Pirate Bay filesharing site.

While the Pirates were the surprise success story of the Berlin elections, the centre-left Social Democrats are also celebrating after topping the polls with 29.5% of the vote. Popular mayor Klaus Wowereit, who has run Berlin for 10 years, will form a new coalition with one of the smaller parties.

For the FDP, meanwhile, the Berlin vote was the latest in a series of humiliating defeats, marking the fifth ejection from a state parliament this year. Despite a last-ditch attempt to tap into public resentment at the bailouts for other eurozone countries, it only managed to attract 2% of the vote, down from 7.6% in 2006.