3 David left ten of his concubines in Jerusalem to take care of his palace. When he returned, he had them taken to another house. He placed soldiers there to guard them. He gave them what they needed. He never slept with any of them again. They had to live there for the rest of their lives as if they were widows.
2 Samuel 20:3 Cross References - NSB
Genesis 40:3
3 So he put them in confinement in the house of the captain of the bodyguard. It was the same place where Joseph was imprisoned.
2 Samuel 15:16
16 The king left on foot. His whole household followed him. The king left ten concubines behind to take care of the palace.
2 Samuel 16:21-22
21 Ahithophel answered: »Some of your father’s wives were left here to take care of the palace. You should have sex with them. Then everyone will find out that you have publicly disgraced your father. This will make you and your followers even more powerful.«
22 They pitched a tent for Absalom on the palace roof. There in the sight of everyone Absalom went in and had intercourse with his father’s concubines.