The junior nurse came back from his break just before 04:00 BST and resumed care of James, the court heard.

Mr Thomas told jurors: “He found that the monitors had not been reattached and he went about connecting them up himself.

“He switched the machines on but there was no signal. He assumed there must be a fault with the machines.

“After several attempts, he realised to his horror that the problem was not that the monitors were not working but that James’s breathing and heart function had both stopped. No breaths. No pulse.”

CPR was started and staff managed to re-establish a pulse, but because he had been “starved” of oxygen James suffered a “serious and irreversible brain injury”.

Tests showed the injury was not survivable, and after consultation with his family James was discharged to a hospice in Ipswich, near his home, where he died the next day.

“James’s death was wholly preventable,” the prosecutor said.

“James died because Anuradha Bhupathiraju failed to carry out that vital monitoring.

“If she had properly carried out the basic job of monitoring James’s condition, she would have known that he had stopped breathing, she would have been able to intervene, and he would have survived.

“Put bluntly, her very serious neglect caused James’s death.”