A man performed a sex act on himself in front of three girls in a seafront toilet block, a jury has been told.

Ahmed Elbasry is accused of exposing himself and being in the women’s lavatories.

Elbasry, 38, allegedly had an “evil laugh” as he walked “very, very slowly” down a corridor in the direction of the schoolgirls.

He is said to have briefly gone out of sight from the children, who were aged between 11 and 13, before coming back into view.

Prosecutors say the complainants locked themselves in cubicles before the defendant tried to look under the gap at the bottom of the partition wall in the neighbouring stall.

He was challenged a short time later by one of the girl’s mothers who had gone to the toilet block.

Police were called and Elbasry was arrested. When interviewed by officers, he denied any wrongdoing.

The defendant is on trial at Bournemouth Crown Court accused of three counts of engaging in sexual activity in the presence of a child.

Opening the prosecution case on Tuesday, August 15, Tom Wright told jurors the incident took place in the toilet block in Undercliff Drive, Boscombe, just to the west of the pier in the early evening in May last year.

Bournemouth Echo: The toilet block at Boscombe beach near the pier

Mr Wright said the defendant went into another nearby toilet block a short time before the alleged incident.

The prosecutor told the court the girls said Elbasry was masturbating and exposing himself.

“The defendant says he did not masturbate in front of those girls and the Crown’s case is that he did,” Mr Wright said.

In an interview with police, one of the girls said when she first saw the defendant in the toilet block his boxers were pulled down and he was exposing himself.

The three children locked themselves into two stalls of the three stalls, the complainant told police.

Bournemouth Echo: The trial is taking place at Bournemouth Crown CourtThe trial is taking place at Bournemouth Crown Court (Image: Daily Echo)

She said she could hear a zip going up and down, which she believed was from Elbasry’s coat.

The girl said they were “so freaked out”, describing it as like “background music in a horror movie”.

They were screaming after the defendant went in the cubicle next to them, waved his arm under the partition wall and put his head in the gap on the ground, the complainant said.

“It was all three of us screaming as loud as we possibly could,” the girl said.

“I don’t think he was expecting us to scream.”

When the mother entered the women's toilets the defendant came out of the cubicle and went into the men's facilities, the jury heard.

A short time later he was confronted and challenged by parents. The defendant, who had put shorts on at this point, gave three different explanations when asked why he was in the women’s toilets, the girl said.

Bournemouth Echo: The toilet block at Boscombe beach near the pier

The girl said he claimed he thought they were unisex toilets, then that he thought he had gone into the men’s toilets before saying the children were lying and he did not do anything wrong.

The defendant was described as intoxicated by witnesses and police officers, Mr Wright said.

Elbasry, of Marina Close, Bournemouth, denies all charges. The trial continues.