A German politician who killed himself on the weekend his Pirate party was voted out of Berlin’s state parliament left a note confessing to the murder of a younger man, the public prosecutor has said. On Monday, police discovered the bodies of Gerwald Claus-Brunner, 44, and a 29-year-old man inside the politician’s apartment in the south-west Berlin district of Steglitz.

The police report stated that Claus-Brunner – known for turning up to sessions of the Berlin city parliament wearing a bandana and dungarees – had taken his own life, while the other man been killed by “blunt force to the upper body”.

According to the public prosecutor, Claus-Brunner killed the younger man last Thursday – not at his own apartment, but at the victim’s flat in Wedding, in north-west Berlin.

Before his own death, Claus-Brunner allegedly posted a package to a party colleague containing personal items and a note in which he confessed to the murder. A spokesperson for the public prosecutor’s office said the note meant the case was considered closed.

According to the German tabloid Bild, Claus-Brunner may have used a sack barrow to transport the body 11km across town to his apartment, where he killed himself.

Local media claimed that the victim had previously worked for Claus-Brunner’s parliamentary office, but reported the politician to Berlin police for stalking in June this year. On 16 September, Claus-Brunner tweeted a picture of the younger man, along with the words: “My love, my life, for ever and ever, for you, my dear curly-head.”

The Pirate party, which entered Berlin’s state parliament in 2011 on the back of a digital rights agenda, saw its share of the vote plummet from 8.9% to 1.7% in Sunday’s election. Claus-Brunner gained 2% of the vote in the district of Steglitz-Zehlendorf. However, according to Bild, the politician is likely to have killed himself before the day of the election, on either Friday or Saturday.

Claus-Brunner had, among other issues, campaigned for more transparency in the privatisation of Berlin’s public waterworks. In 2012, he created a scandal in the Pirate party when he dismissed plans for a women’s quota as a “tit bonus”. Earlier this year, a motion to have Claus-Brunner ejected from the party failed.

Speaking to the Berlin parliament for the last time in late June, he said he expected his party would no longer be part of the parliament after the election. “In this current legislature, you will also stand up and have a minute’s silence for me at the beginning of the plenary meeting,” he added.