Most likely, in response to Saul’s sin (1 Samuel 15:1–35), the Lord had given permission for an evil angel (a demon) to plague Saul with various mental and psychological problems.1 The actions of this evil spirit were meant to be a reminder to Saul of his sin and need to repent. The spirit was not an influence on his personality from within but a force from without, acting upon him.2
10 The next day a harmful spirit from God rushed upon Saul, and he raved within his house while David was playing the lyre, as he did day by day. Saul had his spear in his hand.