IN THE 1930s Albert Einstein was greatly troubled by a phenomenon that came from quantum theory. Entanglement, as it is called, forever intertwines the fates of objects such as subatomic particles, regardless of their separation. If you measure, say, “up” for the spin of one photon from an entangled pair, the theory suggests that the spin of the other, measured an instant later, will surely be “down”—even if the two are on opposite sides of the galaxy. This was anathema to Einstein and others: it looked as if information was travelling faster than light, a no-no in the special theory of relativity. Einstein was quotably derisive, calling the idea “spooky action at a distance”. But after 80 years of physicists’ fretting, a cunning experiment reported this week proves that such action is in fact how the world works.

To save physics from the spooky, Einstein invoked what he called hidden variables (though others might describe them as fiddle factors) that would convey information without breaking the universal speed limit. It took until 1964, though, to tame this woolly idea into testable equations. John Bell, a British physicist, worked out the maximum effect hidden variables could have on a given test. Any influence beyond that, his equations suggested, must be down to spooky action. The Bell inequality, as it became known, sparked decades of clever experiments—sending entangled photons or atoms hither and thither with detectors triggered by this or that—each designed to catch nature out, to banish hidden variables once and for all.

Yet a number of loopholes remained—ways that hidden variables might exert some influence, though the purported mechanisms became increasingly contrived as years and experimental finesse advanced. One was the detection loophole. Reliably catching a single photon, for example, is tricky; lots of them go amiss in a given experiment. But if an experiment does not capture all of its participants, the loophole idea goes, perhaps hidden variables convey information through the missing ones. Another was the communication loophole. If the two measurements happen near enough to one another, some invisible hidden-variable signal might be passing between them (as long as that signal does not go faster than light).

Plenty of experiments have closed one or the other of these loopholes, for example by detecting particles that are more reliably caught than photons, or by sending photons so far apart that no slower-than-light signal could flit between them in time to have an effect. By now, most physicists reckon the hidden-variable idea is flawed. But no test had closed both loopholes simultaneously—until this week, that is.

Ronald Hanson of the University of Delft and his colleagues, writing in Nature, describe an experiment that starts with two electrons in laboratories separated by more than a kilometre. Each emits a photon that travels down a fibre to a third lab, where the two photons are entangled. That, in turn, entangles the electrons that generated the photons. The consequence is easily measured particles (the electrons) separated by a distance that precludes any shifty hidden-variable signalling.

Over 18 days, the team measured how correlated the electron measurements were. Perhaps expectedly, yet also oddly, they were far more so than chance would allow—proving quantum mechanics is as spooky as Einstein had feared.

Though this experiment marks an end to hidden variables, Dr Hanson says it is also a beginning: that of unassailably secure, quantum-enabled cryptography. It was shown in 1991 that the very Bell tests used to probe hidden variables could also serve as a check on quantum cryptography. A loophole-free Bell test, then, could unfailingly reveal if a hacker had interfered with the fundamentally random, quantum business of generating a cryptographic key. So-called device-independent quantum ciphers would, Dr Hanson says, be secure from hackers “even if you don’t trust your own equipment—even if it’s been given to you by the NSA”.

There remains, alas, one hitch that could explain all these counterintuitive findings. Just maybe, every single event that will ever be, from experimenters’ choices of the means of measurement to the choice of article you will read next, were all predetermined at the universe’s birth, and all these experiments are playing out just as predetermined. That, however, is one for the metaphysicists.