Marines were hung upside down naked and whipped at a naval base in a punishment based on the Quentin Tarantino movie Django Unchained, a court martial has heard.

Corporals Danny Foster, 30, and Philip Beer, 34, both face charges of ill-treatment of a subordinate at two locations, including the Faslane naval base on the River Clyde.

Members of 5 Troop 43 Commando are said to have held a daily gathering called Family Time in the TV room during which forfeits would be handed out for minor misdemeanours.

The alleged incidents took place while the troop was tasked with guarding Faslane naval base, home of the fleet's nuclear submarines on the River Clyde, and at the Royal Naval Armaments Depot at nearby Coulport, where the nuclear weapons are stored.

The trial heard punishments given out at Family Time included one based on the Quentin Tarantino movie Django Unchained, involving a marine being hung upside down naked and whipped.

Another involved a marine committing a solo sex act while watching gay pornography.

Marine Ryan Dunn, one of two alleged victims, told the court the two defendants would "lead" the punishments handed out.

He said the punishments would be either chosen by the throw of a dice or by playing a version of Deal Or No Deal using a PowerPoint presentation projected on to the wall.

One of the marines played Noel Edmonds and wore a fake beard.

He said on one occasion he had completed the Deal Or No Deal game and had come out with one of the more lenient punishments.

Beer, acting as the Banker, then stepped in and gave him the New Born Baby, punishment which involved shaving off all body hair.

Mr Dunn said he shaved all his body apart from his backside, adding: "I didn't want to take a razor blade to that part of my body."

He said the following morning Cpl Beer asked another marine to inspect him and then ordered him to shave again but he refused.

Mr Dunn added the two defendants then ordered him to run repeatedly up and down a hill for about one-and-a-half hours while carrying scaffolding poles and other heavy items from a building site.

He said he was also ordered to put a dirty mop bucket on his head.

A further punishment was given to carry a 24kg kettle bell for 24 hours and also carry 20 to 30 water barrels, weighing 20kg each, to the top of a hill before bringing them down again.

Mr Dunn said: "I remember thinking while it was going on, I thought I was meant to be operationally deployable and how was this meant to be helping me do my job?"

Foster denies three charges of ill-treatment of a subordinate and Beer denies two counts. The trial continues.