A man pleasured himself in a Southampton nightclub behind a woman's back after talking with her, a court heard.

Southampton Magistrates' Court was told Khelan Anwari exposed himself and began carrying out a sexual act while at The Edge nightclub in St Mary's. 

The 36-year-old had been speaking to the woman just before the incident. 

Prosecutor Anthony McCafferty said that this caused the woman a 'great deal of shock', causing her to burst into tears.

READ MORE: Totton man due in court after crash with cow on Roger Penny Way

She spoke to security staff who then threw Anwari out of the club before checking the CCTV footage for evidence. 

Anwari was identified and later arrested. 

He admitted outraging public decency on July 16 following the incident on February 4.

Anwari, who has no previous convictions, has since moved from his home in West End Road, Southampton to Westover Road, Bournemouth. 

Nigel Cozens, mitigating, said his client is due to move in with a friend in the Chester area where he plans to work as a barber.

He told the court: "I think he realises now how serious this was and how offensive it was to the lady considered. 

"I advise you to go along with the recommendation (by probation)."

READ MORE: Southampton woman abandoned French Bulldogs for days

He added that working with probation will provide some "much-needed rehabilitation activity as well". 

Anwari received a 12-month community order with up to 35 rehabilitation activity requirement days and a 12-month exclusion order banning him from going to The Edge nightclub. 

He was also ordered to pay a £114 surcharge and £85 court costs which will be deducted from the benefits he is currently receiving. 

Magistrate chair, Jennifer Pitt warned him: "If you want to change your address you must notify your supervisor and get permission to do so. 

"If your supervisor does not agree that you can change your address you need to apply to the court. 

"The important thing is that you keep the lines of communication open."