BERLIN (Reuters) - Police units sent from Berlin to help secure a G20 summit in Hamburg next week have been sent home after media reports that some officers had sex and urinated in the open while others brandished weapons while drunk at a wild party.

A Hamburg police spokesman confirmed that three units of around 300 officers in total from Berlin had been discharged and would not join the operation to secure the event, where German police are bracing for violence by anti-capitalist protesters.

Mass-selling newspaper Bild published pictures of what it said were members of a police unit in civilian clothing holding up drinks and beer bottles while others smoked shisha pipes at a Hamburg container village where the police were staying.

Bild did not say how it obtained the pictures.

It and other German newspapers also reported that a policeman and a policewoman had sexual intercourse at the party while others urinated on a fence in the container village, which had been used to house asylum seekers.

Bild further reported that another police officer danced on a table outside wearing nothing but a bathrobe with his weapon hanging from his shoulder.

“I can confirm that the leadership of the Hamburg police decided to discharge the colleagues from Berlin because of inappropriate behaviour,” the police spokesman said.

The Berlin police also confirmed the decision to discharge the three units on Twitter.

Some 20,000 police officers will secure the July 7-8 summit of the G20 leading economies in Germany’s second-largest city.