A king dreamed a peculiar dream but forgot it and got furious. No one could tell him what he had dreamed but the Vizier promised to find smeo one able to do so and to interpret it. He went to find Madimonides and met him at the gate with his teacher. The teacher asked him who he was and what he wanted but before he could answer, Maimonides, though still a child, intervened and told his teacher of the Vizier's errand and of the dream of the king.
He was brought before the king, and told him that he had seen in his dream a table decked with all kinds of food; a swine came out of a corner of the room, ate from every dish and disappeared suddenly. He explained this to the king thus: the numerous dishes were his numerous wives and the swine a slave living with his wives. Maimonides discovered him although he was dressed in female clothes. The King wanted to kill him then and there but Maimonides advised it to be done privately in the night.