A Swiss soldier who was hospitalized after accidentally shooting himself in the foot, has been fined by a military court for endangering his fellow soldiers.

The soldier was on guard duty at the main entrance of the Richtstrahl-Rekrutenschule – a recruit school in Pfäffikon- when he discharged his SG 550 assault rifle by accident while he was carrying out a security check.

RT reports: He told the military court he had been shocked when the shot was fired and never considered his weapon could contain live ammunition.

The soldier was brought to hospital and one of his fellow soldiers received treatment for ringing ears caused by the shot. The court found he had endangered his colleague, who was only five feet away from him when the rifle fired.

According to 20 Minuten, the court said in its ruling: “It can be expected of the soldier found guilty in this case that he would be fully alert while on guard duty carried out while holding a loaded weapon.”

The soldier was fined 300 Swiss francs ($300) and told he will face further fines if he is found to have carried out any other infractions.

Earlier reports suggested the 23-year-old had been distracted by his mobile phone at the time. It is forbidden for soldiers to have their phones on them whilst on guard duty. The court found the soldier did have his phone on his person, but that he had not been looking at it at the time. He told the court he was unaware of this rule, and said his fellow soldiers had their phones with them.