One of the saddest stories in the Bible is about Samson. God was with Samson from the womb. He was a believer that was used greatly by God until he became like the culture around him. The process was slow, like a frog being cooked alive in a pot till it dies.
God did not turn away from Samson; it was Samson who turned away from God to live a perverted life. You know the story. Delilah cut his hair. Samson got up to fight but his strength was no longer with him. The saddest part is that Samson did not know that the Holy Spirit had departed from him.
He no longer was salt and light in his culture.
God left Samson to the consequences of his own choices for the rest of his life. In a sense he was given over to satan for a time. Yet God in His mercy to Samson allowed him to end his life in the service of His Lord.