The Ministry of Defence is to be censured over the deaths of three soldiers on an SAS training exercise in the Brecon Beacons in 2013.
The Health and Safety Executive said it will issue a so-called 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, originally from Penrhyn Bay in North Wales, died during the march and Lance Corporal Edward Maher, from Winchester, and Corporal James Dunsby, from Trowbridge, collapsed and died later.
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 10 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 breach of law the Censure is being issued over is Section 2(1) of the Health and Safety at Work Act 1974, which states: "It shall be the duty of every employer to ensure, so far as is reasonably practicable, the health, safety and welfare at work of all his employees."
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.
There is no financial penalty associated with Crown Censure, but once accepted is an official record of a failing to meet the standards set out in law.
It is thought that the group involved were carrying out an exercise known as the "Fan Dance".
It 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 day in question, July 13, temperatures hit 29.5C, and 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.
The Ministry of Defence said it acknowledged the censure and had apologised for the failures identified by the coroner and the Health and Safety Executive.