1 Samuel 29:9
And Achish answered and said to David, I know that thou art good in my sight, as an angel of God: notwithstanding the princes of the Philistines have said, He shall not go up with us to the battle. And Achish answered and said to David, I know that thou art good in my sight, as an angel of God: notwithstanding the princes of the Philistines have said, He shall not go up with us to the battle.
Achish regarded David as good in his sight and fully trustworthy. To express that confidence he likened David to an angel of God. Despite that confidence, the Philistine princes refused to let David go up with them to the battle.
Their refusal freed David from the danger of having to fight against his own people Israel. Through that refusal God delivered David, breaking the trap his own deception had entangled him in and setting him free. Achish's praise reminded David that he had won such trust by deception, filling him with shame and remorse as unworthy of a servant of Jehovah.