Parshas Pinchus

The medrash states, ‘By law Pinchus should get his reward’. What does the medrash mean that ‘By law’ he should get his reward?

The Ksav Sofer explains that due to Hashem’s mercy, a person does not get rewarded in this world for fear he may become complacent and start doing wrong. Chazal say ‘if one does benefit for the public, he will not come to do anything wrong’. That being so, Pinchus who did such a great thing for the public (by taking away Hashem’s anger) was guaranteed that he would not go wrong. Therefore ‘By law’ (Hashem’s attribute of justice) he could get his reward in this world and was not in need of Hashem’s extra mercy.