1 Samuel 22:4

And he brought them before the king of Moab: and they dwelt with him all the while that David was in the hold.

The time to which this verse belongs is after David slew Goliath. In that period Saul kept David with him and would not allow him to return to his father's house. In that same period the soul of Jonathan was knit with the soul of David, and Jonathan loved him as his own soul.

Jonathan and David made a covenant to be united as brethren. In token of that bond Jonathan gave David his robe and his garments, even to his sword and to his bow and to his girdle. In that period David was entrusted with important responsibilities, yet he preserved his modesty. By that course he won the affection of the people as well as of the royal household.