Answer : The M element gained an electron.
Explanation :
As we know that in a redox reaction the oxidation and reduction reaction takes place simultaneously.
Oxidation reaction : It is a reaction in which a substance looses electrons. In this, oxidation state of an element increases. Or we can say that in oxidation, the loss of electrons takes place.
Reduction reaction : It is a reaction in which a substance gains electrons. In this, oxidation state of an element decreases. Or we can say that in reduction, the gain of electrons takes place.
The given balanced reaction is :

This reaction is a reduction reaction in which the element 'M' gain one electron and form
.
Hence, the M element gained an electron.