21. According to my righteousness. Anciently God promised the blessings of health and prosperity as an immediate reward for obedience (Deut. 28:1-14).
The cleanness of my hands. The hands are the instruments of action. The Lord looks upon the deeds of men as well as their hearts (Ps. 15:2-5; 24:4, 5). At the time when these words were written David could speak openly of the cleanness of his hands, but that was not possible after his sin against Bath-sheba and Uriah the Hittite. We may have here an indication that this psalm was written after the defeat of the Ammonites and their allies (2 Sam. 10) but before David’s sin with Bath-sheba ( 11; see on 11:1).