Two special forces officers who were in charge of an SAS test march in which three candidates died following heat illness made “basic and fundamental” errors in the planning and running of the exercise, a court martial has been told.

They were accused of not carrying out a proper risk assessment as temperatures during the 18-mile (30km) march soared, and did not react when candidates began to be diagnosed with heat illness, it was claimed.

Louis Mably QC, prosecuting, accepted the officers could not be blamed for “systemic failings” that were also at the centre of the case and were the responsibility of the joint forces command at the Ministry of Defence.

The Health and Safety Executive concluded these failings exposed the students to an avoidable risk and the MoD received a so-called “crown censure”.

Mably said the HSE made it clear that the MoD would have faced prosecution for the failings identified, if it were not immune. But Mably argued despite these systemic failings, 1A and 1B were also guilty of personal failings and did not carry out their duty with regard to heat illness with diligence and care.

L/Cpl Craig Roberts and L/Cpl Edward Maher were pronounced dead on the Brecon Beacons in south Wales after experiencing heat illness in July 2013. Cpl James Dunsby died at Queen Elizabeth hospital in Birmingham from multiple organ failure more than two weeks later. He had also experienced heat illness.

Roberts, 24, and Maher and Dunsby, both 31, were part-time soldiers who wanted to try out for the SAS reserve, which works alongside regular troops in some of the world’s most dangerous war zones. They were taking part in the march in searing heat on and around Pen y Fan, the highest peak in south Wales.

How three army reservists died on an SAS march - visual guide Read more

The SAS is not being mentioned by name during the trial. Instead, it is being described as a “specialist military unit”. The court heard that 1A, who was a captain, was in command of the exercise, while 1B was a warrant officer, second class, and was second in command.

Mably explained how the candidates had to cover almost 30km in eight hours and 45 minutes carrying a rucksack weighing up to 27kg and a dummy rifle. Thirty-seven reservists and 41 regular troops took part in the exercise.

The prosecutor alleged that a risk assessment document for the exercise was written by 1B and signed off by 1A. But he described the assessment as a “paper exercise” that had not taken into account the predicted hot weather.

Mably said the first “potential” case of heat illness was seen as early as 11am and the first candidate to be withdrawn because of heat illness came at 12.14pm. Though the officers had the authority to call the march off, it continued and the three men were found collapsed much later in the afternoon.

“The risk of heat illness [was] not properly assessed. They [the defendants] didn’t properly respond to the risk as heat illness casualties began to arise,” he said.

“Things [went] terribly wrong on the ground. The defendants lost control of events.”

The prosecutor said heat illness had “infected” the test. He added that the sort of men who put themselves forward for such an exercise were not the type to give up. “They were operating at or beyond their limits,” he said.

Mably told the court that the risk assessment incorrectly noted that the unit helicopter was available. He also said a civilian ambulance crew refused to go on to the hillside to help the injured men until a mountain rescue team arrived to assist.

He said that no water was available at the two most remote checkpoints, though it had been during previous tests.

Giving more details about the systemic failings highlighted by the HSE, he said a tracking system designed to help directing staff keep an eye on candidates was not fit for purpose and there was no medic with overall responsibility for the exercise.

Both men deny negligence. The hearing continues.