1 Chronicles 22:11-12

22:11 “Now, my son, may the Lord be with you! May you succeed and build a temple for the Lord your God, just as he announced you would. 22:12 Only may the Lord give you insight and understanding when he places you in charge of Israel, so you may obey the law of the Lord your God.

1 Chronicles 11:2

11:2 In the past, even when Saul was king, you were Israel’s commanding general. The Lord your God said to you, ‘You will shepherd my people Israel; you will rule over my people Israel.’”

1 Chronicles 12:18

12:18 But a spirit empowered Amasai, the leader of the thirty warriors, and he said:

“We are yours, O David!

We support you, O son of Jesse!

May you greatly prosper!

May those who help you prosper!

Indeed your God helps you!”

So David accepted them and made them leaders of raiding bands.