When you get arrested and someone\thing is still stalking you they will be placed just outside the prison when you are released at times (this is how to fix being unable to rest\sleep when someone is chasing you and the game does not reset properly) -- so that is probably what is happening - the worshippers you were hitting have entered combat with you and will continue to follow you until they are killed (are you able to wait\sleep ) - you might need to do the shrine quest and then kill them to get it fixed (or reset them so they are not in combat - not sure if that will mess up the shrine quest though !)
I've done this glitch before and this is the first time they appeared at the prison. I can still wait, fast travel, and sleep. I've seen the same thing happen to members of the fighters guild.