from 'umar ibn al-khattaab (radiyallaahu 'anhu) who said that allah's messenger (salallaahu 'alaihi wa'sallam) said:
actions are but by intentions and there is for every person only that which he intended. so he whose migration was for allaah and his messenger, then his migration was for allaah and his messenger, and he whose migration was to attain some worldly goal or to take a woman in marriage, then his migration was for that which he migrated.
so the pillar of actions is pure and sincere intention, and through purity of intention the hearts become upright and at rest, and through it the person comes to know the right way in his religion, thus he does everything in the proper manner. through purity of intention alone will he come to know of the obligations upon him and the rights due to him. through it he will behave justly in all affairs and will give everything its due right, not going beyond bounds or falling short of the mark.
so this hadeeth is one of the ahadeeth which are the pillars of correct understanding of our upright and true religion.
so when the muslim servant clearly realises what he has preceded then it becomes obligatory upon him that he should, without any hesitation, surround his sincere intention with the protective barrier for the islamic personality.
7.reported by al-bukhari (english translation volume 1 page 1 no. 1) and muslim (eng. trans. vol. 3, page 1056, no. 4692)
8.at-taqyeed (2/6-7) of ibn nuqtah