Sometime around 1180 BC, a local official living near the Dakhla oasis (in present-day Egypt) made a bequest in his father’s name. The bequest said that:
Harentbia donates a daily offering of five loaves in favour of his dead father… the official in charge of [the offering’s] execuition will enjoy the protection of the god Amon-Re. The person who fails in this respect shall ‘fall to the sword of Amon-Re’ and in addition ‘a donkey shall copulate with him, [and] he shall copulate with a donkey.'”
(Ljung 2011, p 45)
Bad donkey! No!
According to research, the donkey curse was a common component of legal documents of the era. Apparently a similar curse still exists in Kurdish to date, though presumably not used by lawyers – at least not in an official capacity…
Ljung, P.M., 2010. Swearing: A Cross-Cultural Linguistic Study, Palgrave Macmillan.