Allaah says according to the hadeeth qudsi narrated from His Messenger (peace and blessings of Allaah be upon him): “My slave does not draw near to Me with anything more loved by Me than the religious duties I have enjoined on him.” Then He says: “And My slave continues to draw near to Me with supererogatory works so that I shall love him.” Outward physical acts are not valid and acceptable unless they are accompanied by appropriate actions of the heart, because the heart is like the king and the physical faculties are like his troops. If the king is evil his troops will also be evil. Hence the Prophet (peace and blessings of Allaah be upon him) said: “In the body there is a piece of flesh: if it is sound the whole body will be sound and if it is corrupt then the whole body will be corrupt.” Similarly the (hidden) actions of the heart inevitably affect the (visible) physical actions. So precedence must be given to that which is more obligatory, whether it is called inward or outward. Perhaps things that are called inward may be more obligatory, such as refraining from destructive envy and arrogance, for that is more essential than observing naafil fasts. Or acts that are described as outward or physical may be better, such as qiyaam al-layl (praying at night), which is better than simply giving up some thoughts that may cross one’s mind such as (non-destructive) jealousy, etc. Inward and outward deeds support one another, and prayer keeps one from doing evil actions and generates fear of Allaah, and has other important effects. It (prayer) is the best of good deeds and charity. And Allaah knows best.