If you give an octopus some Molly, it'll probably ask for a cuddle.

That's what a pair of scientists were hoping would happen, anyway, when they devised an experiment to test the effects of MDMA — also known as the psychoactive drug ecstasy or "Molly" — on octopuses.

The goal of this peculiar study, published today (Sept. 20) in the journal Current Biology, wasn't just to see if octopuses could get high (spoiler: they sure can), but also to probe the evolutionary history of octopus behavior. Octopuses are known for being solitary, sometimes surly creatures, with one big exception — when it's time to mate. According to the new study authors, this behavioral shift suggests that octopuses may have some neural mechanism that suppresses antisocial behavior and amplifies sexual urges when love (or at least reproduction) is in the air. [8 Crazy Facts About Octopuses]

Incidentally, similar shifts in sociability are seen in humans who have taken MDMA. That's because MDMA is an amphetamine that increases the production of several mood-regulating neurotransmitters in the brain, including serotonin — a chemical that helps regulate happiness, appetite and sleep. Humans high on MDMA tend to be more social, more energetic, more empathetic and more euphoric than they were in their sober state. (There are also many negative, sometimes permanent health effects.)

Could it be, the researchers wondered, that octopuses evolved with a similar serotonin-uptake system that allows for the switching on and off of social behavior? To test this, the team first scoured the genome of Octopus bimaculoides (commonly known as the California two-spot octopus) to confirm the presence of serotonin transmitter genes. Then, they got several octopus test subjects high on Molly.

Rolling in the deep

In the first phase of the experiment, four male and four female octopuses (all sober) were placed one by one into a tank divided into three compartments. One compartment always contained a stationary object (sometimes a plastic flower pot, sometimes a Chewbacca or Stormtrooper action figure), the middle compartment was always empty, and a final "social" compartment contained either an unfamiliar male or unfamiliar female octopus in a plastic cage. These caged octopuses could reach out and touch the other octopuses, but did not have enough room to leave the cage or start a fight.

One at a time, the test octopuses were placed in the empty central chamber and allowed to explore the various rooms for 30 minutes. During these sessions, a majority of the test octopuses avoided the social chamber when an unfamiliar male octopus was caged there, spending most of their time chilling with Chewbacca instead.

Then, researchers submerged each test octopus into a bath of artificial seawater mixed with liquefied MDMA. Each octopus soaked in its Molly bath for 10 minutes, absorbing the equivalent of a "low oral dose" directly into their blood stream through their gills. Following this, each octopus mellowed out in a 20-minute saline bath, then proceeded back to the social testing tank within a few hours.

Now rolling on a modest dose of Molly, the same octopuses were returned one by one to the test chamber and allowed another 30 minutes to explore. This time, each octopus spent significantly more time in the chamber with the caged octopus than they did in the other chambers. According to the authors, the drugged octopuses also "tended to hug the cage" a lot, and even rubbed it with their mouths, demonstrating the same sort of touchy-feeling compulsions of humans on MDMA.

So, yes, you can get an octopus to roll on Molly. But before we leave you to ponder what a cuddle puddle would feel like if you had eight appendages to cuddle with, the study authors would like you to consider the implications of this unusual experiment.

"The brains of octopuses are more similar to those of snails than humans, but our studies add to evidence that they can exhibit some of the same behaviors that we can," study author Gül Dölen, and assistant professor of neuroscience at the Johns Hopkins University School of Medicine, said in a statement. "What our studies suggest is that certain brain chemicals, or neurotransmitters, that send signals between neurons required for these social behaviors are evolutionarily conserved."

It would appear, if these results are accurate, that octopuses evolved with some of the same mood-regulating mechanisms that humans did, despite having an evolutionary lineage that started about 500 million years before ours. This suggests that serotonin has served a social function in living creatures for a long, long time, and points to an ancient root of an extremely important neurotransmitter. Whether MDMA use also fosters in octopuses an enhanced appreciation of electronic dance music is a study for another day.

Originally published on Live Science.

Want more stories about animals?

FOLLOW NBC NEWS MACH ON TWITTER, FACEBOOK, AND INSTAGRAM.