Two Royal Marine corporals forced soldiers who had failed in routine tasks to masturbate to gay porn and hung them upside down while they were whipped, a court martial has heard.

Cpl Danny Foster, 30, and Cpl Philip Beer, 34, are accused of meting out the abuse at Scottish bases during the unit's own version of TV game show Deal or No Deal.

Foster denies three counts of ill-treatment of subordinates. Beer denies two counts of the same charge between May and August 2014.

The accused, who are attached to 43 Commando, oversaw evening meetings where punishments were handed out to marines who had failed their tasks during the day at Faslane and Coulport naval bases in Argyll. The meetings were called "family time".

The punishments allegedly included one called "Django" – after the Quentin Tarantino western movie 'Django Unchained' – in which marines were hung upside down and whipped, Portsmouth Military Court was told.

Another punishment, called "newborn baby", involved forcing soldiers to shave off all their body hair.

A marine, who cannot be named for legal reasons, told the court he had suffered Post Traumatic Stress Disorder as a result of the punishments.

He said: "You could be punished for anything, starting from just leaving a pen lid on the floor up to operational things like not turning on your radio while on patrol."

The court heard that marines were forced to pick box numbers, like contestants in the game show, with each containing a punishment.

Prosecuting, Lt Col Graham Coombes said: "The first charge relates to a group of marines being forced to masturbate to gay porn, which was shown to them on a laptop.

"The last person to finish would then be further punished. When one of them told Foster 'I ain't doing it', Foster told him 'you f***ing are'."

The unnamed marine said: "The porn was military-themed porn. The men had berets on and people were watching us – we were told the last person to ejaculate would get another punishment.

"I felt disgusted and degraded having to do it. It was massively degrading. I had no power against it; I could not say no."

Coombes added: "Another marine was given the 'newborn baby' punishment and was required to shave off all the hair on his body.

"The complainant had two boxes left in a game of Deal or No Deal when Beer, who was playing the banker, made an offer of the newborn baby punishment. When the complainant was not willing to accept it, Beer told him he was going to receive it anyway."

The case continues.