The Ministry of Defence is to be censured over the deaths of three soldiers on an SAS training exercise in the Brecon Beacons three years ago.
The Health and Safety Executive said it will issue a Crown Censure following the tragedy on one of the hottest days of 2013.
But for Crown immunity, the MoD would have faced prosecution for failings identified, said the HSE.
Lance Corporal Craig Roberts died during the march and Lance Corporal Edward Maher and Corporal James Dunsby collapsed and died later.
HSE head of operations Neil Craig said: “Specialist military units rightly need to test rigorously the fitness and resilience of potential candidates.
“Health and safety is not about stopping people from doing dangerous work or being properly prepared for military duties. Military training is inherently hazardous. However, such testing needs to be managed effectively.
“The MoD has a duty to manage the risks during training exercises. It failed to do so on this occasion.”
It is thought that the group involved were carrying out an exercise known as the “Fan Dance”.
The exercise requires a soldier carrying a weighted pack and rifle to march up and down 2,900ft-high Pen y Fan mountain, then doing it again in reverse, in a set time.
On the July day in question, temperatures hit 29.5C. Emergency crews were called to Pen y Fan after reports that six soldiers had collapsed suffering heat exhaustion.
Recording narrative verdicts at an inquest in Solihull in July 2015, senior Birmingham coroner Louise Hunt said all three soldiers would have survived if Ministry of Defence regulations on heat illness had been followed.
L-Cpl Roberts was originally from Penrhyn Bay in North Wales, L-Cpl Maher, was from Winchester in Hampshire, and Cpl Dunsby was from Trowbridge in Wiltshire.
The HSE said its investigation found a failure to plan, assess, and manage risks associated with climatic illness during the training.
These failings resulted in the deaths of the three men and heat illness suffered by ten others on the march.
Despite its Crown status, the MoD is not exempt from its responsibilities as an employer to reduce the risks to its employees as far as reasonably practicable, it added.
The MoD cannot face prosecution in the same way as non-government bodies and a Crown Censure is the maximum sanction for a government body that HSE can bring.
A Ministry of Defence spokesman said: “The MoD acknowledges this censure and has apologised for the failures identified by the coroner and the Health and Safety Executive.
“We have made several improvements to reduce the risks on such exercises.”