WASHINGTON - Borrowing a trick long used by cooks to determine if an egg is raw or hard-boiled, researchers have cracked a mystery at the core of Mercury, and they say there is molten fluid inside the tiny planet.

The finding, published today in the journal Science, helps explain the Mariner 10 spacecraft's unexpected detection of a small magnetic field around the planet several years ago. The discovery puzzled scientists, who believed that because of its small size Mercury's core had long ago solidified.

But the most common explanation for a magnetic field is a molten interior. Earth, for example, has both, while the moon and Mars show evidence only of ancient magnetic fields.

The Messenger spacecraft is on its way to Mercury and is expected to arrive next year. Meanwhile, researchers led by Jean-Luc Margot, an assistant professor of astronomy at Cornell University, launched their own attempt to learn about the planet's core.

For many years, cooks wondering if an egg is raw or cooked have used a simple trick to find out - spin it. A hard-boiled egg with a solid interior will spin smoothly; a raw one with a liquid center will wobble.

Of course, Mercury may be small, but not that small. So scientists studied its movements using telescopes in California, Puerto Rico and West Virginia.

They aimed powerful radar signals at the planet, then received the echo, which appeared as a unique pattern of speckles reflecting the roughness of the surface, at widely separated locations.

By measuring how long it took for a particular pattern to reproduce at different places, they were able to track Mercury's spin with great accuracy.

The observations, conducted over five years, allowed the scientists to calculate twists in Mercury's spin, called librations, caused by the sun's gravity.

They concluded that the magnitude of the librations was twice what would be expected for a completely solid body. But it matched what would be expected for an object whose outer core is molten and not forced to rotate along with its shell.