The 350-year-old mystery of why pendulum clocks hanging from the same wall synchronize over time may finally be solved, scientists say.

In 1665, Dutch physicist Christiaan Huygens, inventor of the pendulum clock, was lying in bed with a minor illness and watching two of his clocks hanging on a wall, said Henrique Oliveira, a mathematician at the University of Lisbon and co-author of a new study detailing the findings. Huygens noticed something odd: No matter how the pendulums on these clocks began, within about a half-hour, they ended up swinging in exactly the opposite direction from each other.

The cause of this effect — what Huygens called an "odd kind of sympathy" — remained a mystery for centuries. But recently, scientists analyzing two pendulum clocks hanging from the same beam found that the clocks could influence each other through small forces exerted on the supporting beam. However, "nobody tested properly the idea of clocks hanging on the same wall," Oliveira told Live Science.

In conversations over coffee, Oliveira andstudy co-author Luís Melo, a physicist at the University of Lisbon, decided to analyze how two pendulums might interact through an immobile wall, instead of investigating how they might interactthrough a movable beam as had been done in previous research.

The researchers calculated that, as pendulums move back and forth, sound pulses could travel through the wall from clock to clock. These pulses can interfere with the swings of the pendulums, eventually causing them to synchronize.

The investigators tested their idea with experiments involving two pendulum clocks attached to an aluminum rail fixed to a wall. Their results showed that changes in the speed of the pendulum swings coincided with cycles of those sound pulses.

In addition, they plan to expand their model to explain the behavior of other kinds of oscillators, such as the electronic oscillators used to synchronize activity on microchips, Melo said.

Oliveiraand Melo detailed their findings online July 23 in the journal Scientific Reports.