The study, led by Josep Call at the Max Planck Institute for Evolutionary Anthropology in Leipzig, Germany, consisted of three experiments involving gorillas, chimpanzees, bonobos and orangutans.
Each animal was presented with two hollow tubes, one baited with a food reward, the other empty.
In the first experiment, the apes were prevented from watching the baiting, but the tubes were shaken to give them auditory information.
In the second experiment, they were shown the location of the food and then, at variable time delays, encouraged to retrieve it.
In the last experiment, researchers compared the apes' response between visible and hidden baiting when the quality of the food reward varied.
The scientists found the apes were more likely to check inside the tube before choosing when high stakes were involved, or after a longer period of time had elapsed between baiting and retrieval. In contrast, when they were provided auditory information, they reduced the amount of checking before choosing.
Call said, taken together, the findings show the apes displayed metacognition, defined as "cognition about cognition," or knowing about knowing, and were aware their decisions might be wrong.
The study is detailed in the journal Animal Cognition.