Yûsuf 12:35
ثُمَّ بَدَا لَهُم مِّن بَعْدِ مَا رَأَوُا الْآيَاتِ لَيَسْجُنُنَّهُ حَتَّىٰ حِينٍ ٣٥
Thumma bada lahum min baAAdi ma raawoo alayati layasjununnahu hatta heenin
Then even after seeing the signs of (Yusuf’s [Joseph’s] decency and righteousness), they deemed it appropriate to imprison him for a time (so that the gossip of the episode amongst the people might die down). (12:35)
Yusuf is imprisoned without Justification
Allah says, `Then it occurred to them that it would be in their interest to imprison Yusuf for a time, even after they were convinced of his innocence and saw the proofs of his truth, honesty and chastity.' It appears, and Allah knows best, that they imprisoned him after the news of what happened spread. They wanted to pretend that Yusuf was the one who tried to seduce the `Aziz's wife and that they punished him with imprisonment. This is why when the Pharaoh asked Yusuf to leave jail a long time afterwards, he refused to leave until his innocence was acertained and the allegation of his betrayal was refuted. When this was successfully achieved, Yusuf left the prison with his honor intact, peace be upon him.