What is most closely the meaning of custody as it is used in paragraph 20 of the text?

Another day went by and we still had heard nothing. Then word came that he had been taken into custody and shipped out. Where to, or for how long? No one knew. All my brothers’ attempts to find out were fruitless.
a
noun | a shopper at a store
b
noun | imprisonment
c
noun | a creamy pastry filling
d
noun | protective care

b

noun | imprisonment