In 1 Samuel 13, Saul's dynasty comes to an end when he is judged for making an offering on behalf of the prophet Samuel. With one act, Saul looses favour with God—so much so that Samuel tells Saul that God will replace him with someone "after [God's] own heart". Had Saul obeyed, then today we might have spoken of the house of Saul as we speak of the house of David, for Samuel said that if Saul had obeyed, "the Lord would have established your kingdom on Israel forever".
At first glance, this seems very harsh. All the heroes of the Bible (apart from Jesus) failed God at some point. Yet God was always willing to forgive. So why is God so quick to dismiss Saul from the throne of Israel?
The reason lies in Saul's answer: he said that he wanted to "entreated the favour of the Lord". This is very telling. Saul did not know God. He approached God as the pagans approached their false gods: believing their favour could be won over or earned. Sacrifices to God do not provide Him with anything which He does not have (cf. Hosea 6:6, Malachi 1:10–13, Isaiah 1:11, Amos 5:2–22). What God is interested in, is the contents of our hearts. Saul's test was one of faith, and his words betrayed the fact that he did not have a right relationship with God, and probably never would have. This meant that he could never be the figurehead of the dynasty which ruled over Israel.
But what is it that David had which made him "after [God's] own heart"? He was obedient to God. Saul, like Adam and Eve, rebelled against God. But David was also disobedient to God's commandments, so why did he keep God's favour? To answer this, one must realise that, in our fallen world, there is a difference between being obedient and being without sin. No-one is without sin, and thus no-one can serve God perfectly. What matters, however, is how we act when we do sin and that we keep faith in God. David turned away from his sins and repented (2 Samuel 12, Psalm 51), accepting the forgiveness of sins which God offers us, as well as righteous punishment which is God's prerogative to bestow. Saul simply went his way, seemingly without repentance or understanding of the implication of what just had happened.
Comments
Saul's problems started much earlier
1Sa 15:2 Thus saith the LORD of hosts, I remember that which Amalek did to Israel, how he laid wait for him in the way, when he came up from Egypt.
3 Now go and smite Amalek, and utterly destroy all that they have, and spare them not; but slay both man and woman, infant and suckling, ox and sheep, camel and ass.
Saul disobeyed
1Sa 15:8 And he took Agag the king of the Amalekites alive...
Not quite
Hi Petri, thank you for your comment. The story which you refer to happened after the events which I name in my article. But, yes, there are examples which show that Saul was on a slippery slope after God had withdrawn His favour from him.