1 Samuel 19:9
And the evil spirit from the LORD was upon Saul, as he sat in his house with his javelin in his hand: and David played with his hand. And the evil spirit from the LORD was upon Saul, as he sat in his house with his javelin in his hand: and David played with his hand.
This took place after the slaying of Goliath, when Saul kept David with him and would not permit him to return to his father's house. At that time the soul of Jonathan was knit with the soul of David so that Jonathan loved him as his own soul, and Jonathan and David made a covenant to be united as brethren. In token of that covenant Jonathan gave David his robe and his garments, even his sword and his bow and his girdle. David was entrusted with important responsibilities, yet he preserved his modesty and won the affection of the people as well as of the royal household. Saul yielded himself to the control of a cruel spirit of jealousy because the women ascribed thousands to him and ten thousands to David, which made him fear that David would take the kingdom. Because the people esteemed and loved David, Saul was afraid to harm him openly and watched for an opportunity to slay him.
While the evil spirit was upon Saul as he sat in his house with his javelin in his hand, his former bitterness and passion overcame him. David played before him with his hand as usual to soothe his troubled mind. Saul hurled his sharp-pointed javelin with force at David's heart to kill him and pin him to the wall.
The angel of the Lord turned the weapon aside so that David escaped. Angels of God preserved David's life by making him understand Saul's purpose, so he sprang to one side unharmed while the weapon drove deep into the wall where he had been sitting.