Christiaan Huygens knew clocks. The Dutch scientist, mathematician and inventor-of-all-trades is credited with inventing the pendulum clock and developing one of the first balance spring watches. But even he couldn’t explain the strange phenomenon he noticed one day in 1665 when he was confined to bed with a “slight indisposition.”

The pendulums of two clocks attached to the same beam in his house had somehow synchronized their swings, oscillating in perfect opposition to one another. Even when Huygens — so entranced by the peculiar puzzle he apparently forgot his “indisposition” — clambered over to stop and restart the clocks at different times, the pendulums eventually returned to their synchronized dance.

Huygens devoted hours to studying this “odd kind of sympathy” between the clocks, but was stumped as to what caused it. And for the next 3½ centuries, the rest of the scientific community was stumped, too.

Now a pair of Portuguese physicists say they have an answer.

In a study published last week in the journal Scientific Reports, they argue that tiny pulses created by the ticking clocks traveled through the wood connecting them and slowly pushed the pendulums into their synchronized swing.

According to Live Science, the theory was developed over cups of coffee and tested in a lab, where the researchers recreated Huygens’s old experiment with two clocks of their own attached to an aluminum beam. They set the clocks to ticking and measured each swing of their pendulums with high-precision sensors. Over the course of many, many hours (the experiment sometimes took days to run) the swings came into sync with one another, just as Huygen’s had.

The trick lay in the mechanics of the timepiece itself.

When the pendulum swings one way, it turns a gear in the clock’s interior, which in turn drops the weight that pulls the second hand around the clock’s face. The gear catches, and then the pendulum swings back the other way, setting the mechanism in motion once more. The classic “tick-tock” of a clock is the sound of the gear locking and unlocking as the pendulum swings.

When two clocks are hung from the same beam, their incessant ticking and tocking starts to affect how their pendulums swing, the study says. Henrique M. Oliveira, a mathematician at the University of Lisbon and one of the study’s co-authors, told the Huffington Post that the sound pulses travel through the connecting beam and act as a tiny “kick” that almost imperceptibly alters the pendulums’ swings. Over the course of hours, the little kicks add up, bringing the swings closer and closer into synch. When the clocks are at “phase opposition” — they reach opposite points of their swing at exactly the same time — the kicks cancel each other out. The two clocks are stuck in synchrony with one another.

Oliveira and his co-author are not the first modern scientists to tackle the topic. A study published in the Proceedings of the Royal Society in 2002 put forward the idea that the spontaneous synchronization was caused by tiny movements of the platform the clocks are connected to. But Oliveira and his co-author say that their experiment is more like the model Huygens was working with and offers an even closer explanation for the phenomenon the scientist spotted 350 years ago.

Jonatan Peña Ramirez, a researcher at the Technical University of Eindhoven in the Netherlands who has also published studies of the Huygens’s clock case, isn’t so sure. He told Smithsonian Magazine that synchronization happens even when the jerky mechanism driving the clocks is changed to a smooth one, implying that discrete sound impulses from the clunky tick-tocking may not be behind the phenomenon.

Scientists are sure to keep studying the case, Ramirez said, because spontaneous synchronization happens so often in nature. The flickers of fireflies sync up over the course of a summer’s night, people gathered in a group eventually start to swing their arms in unison. The phenomenon has been seen at a scale as small as particle physics and as large as the orbit of moons around their planets. All that means there’s lots more to learn from the “odd kind of sympathy” Huygens saw in his clocks.

“Huygens’ synchronization,” Ramirez said, “is far from being solved.”