Recorded from 1803 with uncertain origin, but possibly a euphemism for Holy Mary, with Mackerel being a nickname for Catholics because they ate the fish on Fridays. Another suggested explanation is the practice of selling mackerel on Sundays in the seventeenth century (because its quality deteriorates rapidly), so it was known as a holy fish.