Researchers from India have found a new spider species that looks an awful lot like the Sorting Hat from the Harry Potter series, prompting them to name it Eriovixia gryffindori after the fictitious wizard Godric Gryffindor.

The spider, which measures only 7 millimetres (0.28 inches) in length, was found in the Kan forest of Western Ghats in southwest India, where the team says it uses its unique body to blend in with foliage.

"As a youngster, I was very fond of reading Harry Potter books. So, when I encountered this tiny spider, I thought of the magical hat," independent naturalist Javed Ahmed told Vijay Singh at The Times of India.

"We're excited to have found this new spider whose shape is similar to the magical sorting hat owned by the wizard [Gryffindor]. The discovery was made in Kans forest area of Karnataka."

Along with his colleagues, Ahmed has described five new spider species in the last two years.

The team says the spider is a new member of the Eriovixia genus, which contains roughly 20 other spiders that all spin an orb-like web and are found throughout Asia and Africa.

They found the new specimen in a bush about 1.2 metres (4 feet) off the ground while exploring the Kans forest, an area known as a diversity hotspot, because it's been protected for generations by local villagers, keeping many of its precious creatures thriving and safe.

The spider's unique body shape acts like a kind of shade for it, and is meant to protect it from predators that – if the spider is lucky – will mistake it for a dried leaf.

To the researchers, though, it looked like one thing: the Sorting Hat.

For those who are unfamiliar with the Sorting Hat, in Harry Potter it was once owned by the wizard Godric Gryffindor, who was one of the founders of Hogwarts School of Witchcraft and Wizardry, the primary setting for the books.

Every year, as newcomers enter the school, the hat is used to sort students into their houses.

As the team writes:

"This uniquely shaped spider derives its name from the fabulous, sentient magical artefact, the sorting hat, owned by the (fictitious) medieval wizard Godric Gryffindor, one of the four founders of Hogwarts School of Witchcraft and Wizardry, and stemming from the powerful imagination of J.K. Rowling.

An ode from the authors, for magic lost, and found, in an effort to draw attention to the fascinating, but oft overlooked world of invertebrates, and their secret lives."

The team hopes that the magic-inspired name will bring more attention to the study of invertebrates like spiders, an area of research they feel is often overlooked.

Considering that a 2001 Gallup poll found spiders were one of the American public's top fears – with about a quarter of the participants saying they were the thing they were most frightened of – that isn't too surprising.

"It's easy and far more common to be enchanted by the more 'charismatic' life forms," Ahmed told Sarah Keartes from Earth Touch News, explaining that, even if they are overlooked, tiny creatures still play a major role in ecosystems.

"They quietly go about doing what they do best: helping maintain a delicate natural balance in an ecosystem. They keep the 'machinery' in working condition."

One person who was touched by the discovery was J.K. Rowling herself, responding to the news with a congratulatory tweet to the Ahmed.

"When I first read the books, I had no idea I would one day end up naming a species, after such an interesting, fun and whimsical character, and be congratulated by Rowling herself," Ahmed told Katie Mettler from The Washington Post.

"It was quite a moment."

The team's work was published in the Indian Journal of Arachnology.