President Sarkozy accepted Gen Cuche's resignation
The French army chief of staff, Gen Bruno Cuche, has resigned two days after a soldier injured 17 people at a military show.
Gen Cuche offered his resignation on Tuesday to President Nicolas Sarkozy who accepted it.
The soldier used real bullets instead of blanks at the public demonstration at a barracks in south-western France.
Four people, including a child, were seriously injured in the incident. They are now said to be out of danger.
On Monday, President Sarkozy, who visited the wounded in hospital, said he would seek explanations from the whole chain of command over the incident.
Earlier, Defence Minister Herve Morin called for "immediate sanctions... without waiting for the conclusions of the judicial and military enquiries".
The incident highlighted "grave deficiencies in the use of ammunition and in the security of public demonstrations held at regiments' open days", the defence ministry said in a statement.
The resignation is a measure of how seriously the French government, and in particular President Sarkozy, is taking this extraordinary breach of safety procedures, says the BBC's Hugh Schofield in Paris.
The shooting occurred during a public demonstration of hostage-freeing techniques at a barracks in Carcassonne, in the Aude region.
The sergeant who fired the shots is being held in custody and is expected to be charged on Tuesday with causing unintentional injury.
It is now thought he had held on to some live ammunition from a previous exercise in breach of regulations and mistakenly loaded them into his assault rifle during the display.
Questions are also being asked about the organisation of the event, in which an actor posing as a terrorist was positioned among the public that meant that the soldier was firing straight into the crowd.
For France, it is an appallingly embarrassing incident just as the country takes over the presidency of the European Union, with defence one of President Sarkozy's top priorities for the next few months, our correspondent adds.