
Thousands of demonstrators for and against the far-right faced off in mass rival rallies in Berlin on Sunday, where calls of 'We are the people' were countered with 'Go away, Nazis'.

The march organised by the anti-immigrant, anti-Islam Alternative for Germany (AfD) drew over 5,000 supporters while the counter-demonstrators numbered more than 25,000, police said.

The rallies passed off largely peacefully, although Berlin police said on Twitter that they had to use pepper spray to stop 'demonstrators from trying to break down barriers' at one square.

AfD supporters kicked off their march 'for the future of Germany' shortly after midday at Berlin's main train station, before walking to the Brandenburg Gate, with many waving Germany's black, red and gold flag.

Police on horseback keep the peace by the Brandenburg Gate in the centre of Berlin during today's AfD demonstration

AfD demonstrators waving German flags during an anti-immigration and anti-Angela Merkel protest in Berlin today

A police officer watches on as counter-demonstrators take to the river near the Bundestag in Berlin today

AfD leader Alexander Gauland (centre) marches with party member Beatrix von Storch (right) and other protesters in Berlin

Police break up a clash between protesters and opponents of the right-wing Alternative for Germany party in Berlin

Georg Pazderski (second left), the chairman of the German AfD joins co-leader ALexander Gauland (fourth left) at the march

Police arrest a protester at Friedrichstraße station in the centre of Berlin after the anti-immigration march today

People with sticks clash on the platform of Friedrichstraße station in Berlin as AfD supporters and opponents gathered

People hold up German flags and a calling for an end to the days of an 'open door' immigration policy in Germany

A demonstrator shouts slogans during the AfD's march through the centre of Berlin in protest at the German government

Along the route, their chants of 'Merkel must go' and 'We are the people' were occasionally drowned out by whistles, jeers and outstretched middle fingers from counter-demonstrators in side streets blocked off by police.

At last year's elections the AfD became the third-largest party in the Bundestag, winning 92 seats. Because of the 'grand coalition' between the two major parties the AfD is currently the largest opposition party.

Founded as an anti-EU party during the euro crisis in 2013, it reinvented itself with an anti-immigration stance after Merkel's decision to open Germany's borders to more than a million refugees in 2015.

'Now we know that many Islamists were among the refugees and they have no respect for women,' 41-year-old AfD member and teacher Christine Moessl told AFP.

Addressing the crowd, AfD chairman Alexander Gauland said: 'Merkel is not Germany. We love our country. And we want to pass it on to our children the way our grandfathers did for us.'

AfD deputy leader Beatrix von Storch, the granddaughter of Adolf Hitler's finance minister, told demonstrators that Germany was 'a prime example of failed integration'.

Some of the counter-demonstrators were from the city's club scene, with one group aiming to 'Bass the AfD away' with music blasting from speakers mounted on trucks.

'We want to be loud enough to drown out the racist speeches,' an activist named Rosa told RBB public television. The thudding techno beat echoed across the city centre on Sunday afternoon.

Another group of anti-AfD protesters were on a boat on the Spree river holding up placards saying 'You stink!'

A marcher shouts to protesters as AfD supporters and counter-demonstrators took to the streets of Berlin today

An anti-AfD marcher holds up a sign saying 'Stop the AfD' and reading: 'Our alternative is called solidarity'

Police drag a man away from the protests while demonstrators hold up German flags in the centre of Berlin today

Police on horseback patrol the area by the Brandenburg Gate in the centre of Berlin during today's demonstrations

Police officers drag a man away from the protests near the Brandenburg Gate in the centre of Berlin today

Party co-leaders Alexander Gauland and Alice Weidel, both elected to the Bundestag last year, marching in Berlin today

Thousands of demonstrators waving German flags march from Berlin's main railway station towards the Brandenburg Gate

People dance in a protest against the AfD's anti-immigrant demonstration on the streets of Berlin today

A woman holds a flag as counter-demonstrators sought to stifle the AfD's anti-immigrant protest in Berlin today

AfD supporters wave German flags as they walk alongside the river in Berlin. One placard calls for the 'protection of borders'

Police patrol the area near the Brandenburg Gate to keep the peace during the AfD demonstration in Berlin today

Left-wing protesters shout and hold up signs saying 'Stop the AfD' as they joined a counter-demonstration in Berlin

A protester waves the German flag in the centre of Berlin today where AfD supporters clashed with counter-demonstrators

A couple embrace near the Brandenburg Gate in Berlin, with the woman holding a sign saying: 'Stop hate'

Police arrest a man at a railway station in Berlin during the demonstrations for and against the AfD today