Students tackled multiple-choice questions that required them to mentally rotate obscure shapes.
Parents, take note! Playing with Legos as well as certain video games can help children develop spatial skills critical to success in fields like science and engineering, scientists say.
The research found that gender differences in spatial skills - like the skill needed to mentally rotate objects - disappear when the impact of childhood play was taken into account.
"By providing spatial training to children, and providing spatially demanding toys before schooling starts, we can give them the opportunity to develop skills important in fields like science, technology, engineering and math," said Anne Gold, from Cooperative Institute for Research in Environmental Sciences (CIRES) in the US.
The study, published in the journal Geosphere, surveyed hundreds of undergraduate students and found a huge spread in their spatial skills.
Students scored between six and 75 per cent correct responses on a written, spatial-knowledge test.
"All of these students completed a K-12 education. If spatial skills were taught in grade school, we wouldn't see this significant spread of skills across the university classroom," said Gold.
"Something must be happening earlier in childhood or outside of school that makes some kids better spatial thinkers," she said.
Researchers from the University of Colorado Boulder and Carleton College in Minnesota gave written tests to 345 university undergraduates.
Students tackled multiple-choice questions that required them to mentally rotate obscure shapes, for example, or visualise an object's cross section.
The researchers dissected the influence of several factors on spatial skills scores, including: college major, childhood play patterns, standardised test scores, number of science courses taken, and gender.
They found that childhood play patterns made a huge difference.
Spatial skill scores were significantly higher among students who engaged with construction-based toys, and certain video games.
Overall, male students performed better than female students on the test, but the young women and men who played with construction-based toys and video games performed equally well.
In other words, when researchers controlled for the impact of childhood play patterns, gender differences disappeared.