An atomic clock at the UK's National Physical Laboratory (NPL) has the best long-term accuracy of any in the world, research has found.

Studies of the clock's performance, to be published in the journal Metrologia, show it is nearly twice as accurate as previously thought.

The clock would lose or gain less than a second in some 138 million years.

The UK is among the handful of nations providing a "standard second" that keeps the world on time.

However, the international race for higher accuracy is always on, meaning the record may not stand for long.

The NPL's CsF2 clock is a "caesium fountain" atomic clock, in which the "ticking" is provided by the measurement of the energy required to change a property of caesium atoms known as "spin".

By international definition, it is the electromagnetic waves required to accomplish this "spin flip" that are measured; when 9,192,631,770 peaks and troughs of these waves go by, one standard second passes.

Matching colours

Inside the clock, caesium atoms are gathered into bunches of 100 million or so, and passed through a cavity where they are exposed to these electromagnetic waves.

The colour, or frequency, is adjusted until the spins are seen to flip - then the researchers know the waves are at the right frequency to define the second.

The NPL-CsF2 clock provides an "atomic pendulum" against which the UK's and the world's clocks can be compared, ensuring they are all ticking at the same time.

That correction is done at the International Bureau of Weights and Measures (BIPM) in the outskirts of Paris, which collates definitions of seconds from six "primary frequency standards" - CsF2 in the UK, two in France, and one each in the US, Germany and Japan.

For those six high-precision atomic pendulums, absolute accuracy is a tireless pursuit.

At the last count in 2010, the UK's atomic clock was on a par with the best of them in terms of long-term accuracy: to about one part in 2,500,000,000,000,000.

What time is it, exactly? The international time standard is maintained by a network of over 300 clocks worldwide

These are sent by satellite and averaged at BIPM, a measurement institute in France

But the "tick" of any one of them could drift out of accuracy, so BIPM corrects the average using six "primary frequency standards" in Europe, the US and Japan

Their corrected result, "International Atomic Time", is occasionally compared with the time-honoured measure of time by astronomical means: "Universal Time"

A "leap second" is periodically added to correct any discrepancy between the two

But the measurements carried out by the NPL's Krzysztof Szymaniec and colleagues at Pennsylvania State University in the US have nearly doubled the accuracy.

The second's strictest definition requires that the measurements are made in conditions that Dr Szymaniec said were impossible actually to achieve in the laboratory.

"The frequency we measure is not necessarily the one prescribed by the definition of a second, which requires that all the external fields and 'perturbations' would be removed," he explained to BBC News.

"In many cases we can't remove these perturbations; but we can measure them precisely, we can assess them, and introduce corrections for them."

The team's latest work addressed the errors in the measurement brought about by the "microwave cavity" that the atoms pass through (the waves used to flip spins are are in the same part of the electromagnetic spectrum as the waves that flip water molecules in food, heating them in a microwave oven).

A fuller understanding of how the waves are distributed within it boosted the measurement's accuracy, as did a more detailed treatment of what happens to the measurement when the millions of caesium atoms collide.

Without touching a thing, the team boosted the known accuracy of the machine to one part in 4,300,000,000,000,000.

But as Dr Szymaniec said, the achievement is not just about international bragging rights; better standards lead to better technology.

"Nowadays definitions for electrical units are based on accurate frequency measurements, so it's vital for the UK as an economy to maintain a set of standards, a set of procedures, that underpin technical development," he said.

"The fact that we can develop the most accurate standard has quite measurable economic implications."