1 Samuel 12:15
But if ye will not obey the voice of the LORD, but rebel against the commandment of the LORD, then shall the hand of the LORD be against you, as it was against your fathers. But if ye will not obey the voice of the LORD, but rebel against the commandment of the LORD, then shall the hand of the LORD be against you, as it was against your fathers.
The warning belongs to Samuel's farewell address to Israel at Gilgal, given after the people had welcomed Saul as king. Gilgal itself recalled Israel's entry into the promised land and God's earlier acts there, as well as the consequences of sin and of neglecting to seek God's counsel. The condition set before them was plain: if they would not obey the voice of the Lord but rebelled against His commandment, then His hand would be against them as it had been against their fathers.
Having a king did not remove their duty to fear, serve, and obey God, for both the people and their king were still required to keep following Him. Their prosperity under the kingship was made to depend on that obedience, with rebellion bringing judgment upon them. Their past calamities had come from just such rebellion, while repentance had brought deliverance, so despite the sin involved in demanding a king, God would pardon and bless them if they now showed true repentance and fidelity.
For Saul himself, obedience and trust in God were the conditions on which his kingship stood, and had he remained obedient his kingdom would have been secure with God as his guide and shield. Refusing the Lord's commands brought divine opposition, as it had against Israel's fathers. Even when his rebellion had nearly silenced God's voice in him he still had an opportunity to repent, but by turning from God to seek help from Satan's ally he broke his last tie to his Maker and placed himself under demonic control.