Girl possessed by a spirit of divination
A slave girl was possessed by a spirit of divination, or a spirit of Python (a Greek pagan god associated with the oracles of Delphi). Her owners used the possessed girl to tell fortunes in order to make a profit from her.
While traveling to their place of prayer, Paul and his companions met the girl, and for several days, she followed them, shouting. After annoying Paul enough, Paul commanded the spirit to go out of her in the name name of Jesus Christ, and the girl was freed from the spirit.
It happened that as we were on our way to the place of prayer, we were met by a slave-girl who had a spirit of divination [that is, a demonic spirit claiming to foretell the future and discover hidden knowledge], and she brought her owners a good profit by fortune-telling. She followed after Paul and us and kept screaming and shouting,These men are servants of the Most High God! They are proclaiming to you the way of salvation!She continued doing this for several days. Then Paul, being greatly annoyed and worn out, turned and said to the spirit [inside her],I command you in the name of Jesus Christ [as His representative] to come out of her!And it came out at that very moment.— Acts 16:16–16:18 AMP)
This greatly displeased the girl's owners however, since their means of obtaining profits from fortune-telling were gone. The owners seized Paul and brought them to the authorities in order to have them imprisoned.
But when her owners saw that their hope of profit was gone, they seized Paul and Silas and dragged them before the authorities in the market place [where trials were held], and when they had brought them before the chief magistrates, they said,These men, who are Jews, are throwing our city into confusion and causing trouble. They are publicly teaching customs which are unlawful for us, as Romans, to accept or observe.
The magistrates had Paul and Silas beaten and imprisoned. After converting the jailer to Christianity and dealing with the magistrates who had them imprisoned, Paul and Silas were released from prison.