Ruben Filipe Jardim Andrade left the woman distressed and upset by his behaviour, the Magistrate’s Court heard.

Advocate Lauren Taylor, prosecuting, said the woman had knocked on the door of Andrade’s flat in the early hours of the morning on 4 November to ask him to keep the noise down.

He responded by shouting abuse at her and pulling his trousers down.

“She ran back to her flat in tears,” the advocate said. “He admitted he intended to cause distress to the neighbour.”

Andrade has no previous convictions, and Advocate Lucy Marks, defending, argued that the offence was “at the lower end of the scale”.

She added: “There was absolutely no sexual motivation.”

Assistant Magistrate Adam Clarke decided that a pre-sentence report was needed.

He granted Andrade bail on condition that he has no direct or indirect contact with the woman, and must return to court for sentencing on 1 March.