In Welsh foklore, Grims or Kegrims are animal and sometimes evil spirits that most frequently inhabit churches and burial grounds.
When the first churchs were built, it was common to sacrifice and bury an animal in the foundations. It might be an heritage of the old pagan totem and guardian animals as it was believed that its spirit would rise and protect the grounds from evil and wrongdoers. One the other hand, it was also assumed that the first body to be interred in a graveyard would be claimed by the Devil. Therefore to spare a human whatever torment or servitude lay in store, the carcass of an animal would instead be buried first.
Other grims are not actual spirits of animals but instead demons that have assumed the disguise of a common animals. In Wales such devilish spirits were most prone to take the form of horrendous black-skinned pigs, but there has been a considerable variety of strange creatures reported haunting hallowed grounds.