At a Colorado ranch where my relative worked, they had a mule named Prunes. He was big, strong, and intelligent. He was also the ringleader of a small band of horses that regularly escaped from the corral.
One evening they hid near the barn to see how they got out. Just before dark, Prunes approached the gate, flipped up the latch with his nose, and then knocked his head against the lever. The gate swung open and Prunes gave a satisfied snort as he and his friends trotted off to freedom.