Scientists put on their thinking caps to name Eriovixia gryffindori, a new spider species, which resembles the Sorting Hat from the "Harry Potter" books and movies.

A team of arachnologists who are also avid fans of the "Harry Potter" books recently paid tribute to the beloved fantasy novels and their author, J.K. Rowling, as only scientists could — by naming a spider species after one of the magical objects in the series.

The spider has an oddly-shaped brown-patterned body that rises from a wide base to a tapered, bent peak above the spider's back, disguising it as a dried-up leaf.

However, the scientists who discovered the spider noted that its body shape also bears a striking resemblance to the sentient, rhyming Sorting Hat at the Hogwarts School of Witchcraft and Wizardry. So they put on their thinking caps and dubbed the spider Eriovixia gryffindori after the "fabulous" Sorting Hat's original owner — and co-founder of Hogwarts — the fictional wizard Godric Gryffindor, they wrote in the study. [In Photos: 13 Animals That Mimic Plants]

The Eriovixia genus contains 20 species of orb-weaving spider and is widely distributed across Asia and Africa. They are known for having a hairy carapace and a tapering abdomen that is sometimes tipped with a tail-like appendage.

"I'll eat myself if you can find a smarter hat than me." (Image credit: Javed Ahmed et. al)

The researchers found the female spider about 4 feet (1.2 meters) off the forest floor in a shrub in Karnataka, India. It measures 0.3 inches (7 millimeters) in length, and is grayish brown, dotted with darker brown spots. A jagged dark line extends up the side of its leaf-shaped — and hat-shaped — body, dividing a dark back region from a paler underside, further emphasizing the spider's similarity to the foliage where it hides. It is lightly furred with tiny hairs in shades of white and light yellow, the study authors wrote.

Though it resembled other types of Eriovixia spiders, the shape of E. griffindori's genitalia and parts of its exoskeleton told the scientists that it differed enough to be considered a new species.

"Harry Potter" author J.K. Rowling tweeted her approval of E. gryffindori's name, writing that she was "truly honored" and offering her congratulations to the authors for their discovery.

In the study, the scientists described their whimsical name choice as "an effort to draw attention to the fascinating, but oft overlooked world of invertebrates, and their secret lives," proclaiming E. gryffindori to be "an ode from the authors, for magic lost, and found."

The findings were published in the Dec. 2016 issue of the Indian Journal of Arachnology.

Original article on Live Science.