Senior officers in the Armed Forces who cover up allegations of rape and sexual assault to military police will be prosecuted, the Telegraph can disclose.

Ministers have decided to change the law so that commanding officers who become aware of allegations will legally have to tell the police.

Her Majesty’s Inspectorate of Constabularies warned last year that officers were failing to refer crimes such as assault and sexual offences to the Royal Military Police, prompting fears of a culture of closing ranks to protect suspects.

Ministers will add offences of “sexual assault, voyeurism and exposure” to the Armed Forces Act 2006.

A Ministry of Defence source said: “A Commanding Officer has always been obliged to investigate any allegation thoroughly, but may have used his or her discretion with regards to making the service police aware.

“Now they will have no choice but to flag the case to the service police.” The police will then have a duty to pass on the case file to the Director of Service Prosecutions.