He later moved to Egypt, where he died in 412 AH.
He was fond of jest and play, and he composed that well-known poem (1), which runs:
The pangs of passion have shaken my very entrails,
and my patience fled the moment I swore allegiance to grief.
My wits took flight when I beheld them,
traveling under the darkness of night, folding up the road.
I never ceased to trace their footsteps,
while separation strove to destroy my soul.
Had their mounts known what has befallen me,
they would have wept for me morning and evening.
So I shall divert my thoughts from them
with a folly that would amaze every man of sense.
And with witty snippets I string together, all short,
for I was once a cloth-fuller, felled by frivolity.
Whoever slaps people yet will not let them
slap him back in kind has surely overstepped (2).
Whoever climbs to the rooftop and flings himself
down to the ground will one day come to ruin.
Nothing rouses a mule, once it balks on the road,
like the prompting of a stick.
The beard is merely hair that grows upon the face;
the true rump (3) is the part that lies beneath the testicles.
No one eats walnuts with their shells,
yet fresh dates are eaten together with the soft pulp.
Whoever boils a rooster without first slaughtering it
will see it fly from the pot wherever it pleases (4).