Your dog’s memory works much more like yours than previously thought, according to a new study.

Writing in the journal Current Biology, researchers from the MTA-ELTE Comparative Ethology Research Group in Budapest, Hungary, say that, like people, dogs can “remember and recall events from the past, even when those events didn't hold any particular importance at the time they occurred.”

"The results of our study can be considered as a further step to break down artificially erected barriers between non-human animals and humans," said Claudia Fugazza, an author of the study. "Dogs are among the few species that people consider 'clever,' and yet we are still surprised whenever a study reveals that dogs and their owners may share some mental abilities despite our distant evolutionary relationship."

Testing dogs’ memories is difficult since they are unable to speak, but researchers used a trick called “do as I do,” meaning a human performs an action, such as jumping in the air and then urging the dog to do the same by saying “do it.”

This ability to be trained, however, doesn’t prove canines have episodic memories. To test that, researchers added a wrinkle to the “do as I do” trick.

One group of dogs was trained to imitate a human’s actions, but another group was trained to lie down no matter what action the human took.

After the dogs had been trained to lie down, researchers “surprised” them with a “do it” command, which they say caused the dogs to lie down.

“The dogs recalled what they'd seen the person do even though they had no particular reason to think they'd need to remember,” according to a news release on the study. “They showed episodic-like memory.”

The memories seemed to last over time but did eventually fade, researchers said.

Researchers add that similar tests could be used on other animal species.

"From a broad evolutionary perspective, this implies that episodic-like memory is not unique and did not evolve only in primates but is a more widespread skill in the animal kingdom," Fugazza said. "We suggest that dogs may provide a good model to study the complexity of episodic-like memory in a natural setting, especially because this species has the evolutionary and developmental advantage to live in human social groups."