'Captain of the Guard' in the Bible
Now in Egypt the Midianites sold Joseph to Potiphar, one of Pharaoh's officials, the captain of the guard.
Now Joseph had been brought down to Egypt. An Egyptian named Potiphar, an official of Pharaoh and the captain of the guard, purchased him from the Ishmaelites who had brought him there.
so he imprisoned them in the house of the captain of the guard in the same facility where Joseph was confined.
The captain of the guard appointed Joseph to be their attendant, and he served them. They spent some time in custody.
Pharaoh was enraged with his servants, and he put me in prison in the house of the captain of the guards -- me and the chief baker.