5246. 'And they hurried him out of the pit' means a hasty casting aside of such things as, belonging to a state of temptation, were a hindrance, and a consequent change that was made. This is clear from the meaning of 'the pit' as a state in which vastation and also temptation take place, dealt with in 4728, 4744, 5038; and from the meaning of 'hurrying him out of it' as a hasty casting aside of such things as belong to this - to a state of temptation. For as 'the pit' describes a state of temptation, 'hurrying someone out of it' describes the removal of such things as belong to that state, consequently the casting aside of them, as is evident from what follows next - he cast aside what belonged to the pit, that is, he clipped [his hair and beard] and changed his clothes.
[2] In comparison with the state that follows it, a state in which temptation takes place is like conditions in a pit or prison - squalid and unclean. For when a person undergoes temptation unclean spirits are near him and round about him. They activate the evils and falsities residing with him; and they also confine him to these, increasing them to the point where he reaches despair. So it is that the person dwells at such times amid uncleanness and squalor; and when a visual presentation of that state is made in the next life (for there they can present visually the nature of any spiritual state) it is seen as a cloud issuing from filthy places. And one also smells the stench emanating from the same source. A sphere such as this is what surrounds someone undergoing temptation and also someone undergoing vastation, that is, one who is in the pit on the lower earth, dealt with in 4728.
[3] But when the state involving temptation comes to an end the cloud is dispersed and the air is made clear. The reason this happens is that temptations are the means by which the evils and falsities residing with a person are exposed and removed, the cloud presenting itself while they are being exposed, the clear air when they are being removed. The change that takes place in that state is also meant by Joseph clipping [his hair and beard] and changing his clothes.
[4] One may also compare the state in which temptation takes place to a person's condition when he falls among robbers. When he gets away his hair is dishevelled, his face is rough, and his clothes are tom. If he yields in temptation he remains in that state; but if he overcomes in temptation his condition is happy and peaceful once he has attended to his face, combed his hair, and changed his clothes. What is more, there are hellish spirits and genii who, behaving at such times like robbers, surround and attack him, and so subject him to temptations. From all this it is now evident that 'they hurried him out of the pit' means a hasty casting aside of such things as, belonging to a state of temptation, were a hindrance, and a consequent change that was made.