If Hercule Poirot were an art hound, the mystery of the missing Millet would have the mythical Belgian detective twirling the ends of his finely waxed mustaches in delight.
In this unusual case, a long-lost picture by Jean-Francois Millet, the French realist and pre-Impressionist painter - ''The Captivity of the Jews in Babylon'' (1848) - has just been discovered in the Boston Museum of Fine Arts.
The curious twist to the mystery is that the missing painting has been hanging in the museum for over a hundred years with one of Millet's most important later pictures, ''The Young Shepherdess'' (1870), painted over it. An X-ray revealed the first clue to the whereabouts of the earlier painting.
''The Captivity of the Jews in Babylon'' was ''one of Millet's most ambitious paintings,'' says Alexandra Murphy, assistant curator of European paintings at the Boston museum. ''He spent a good deal of time preparing (it) for the major Paris Salon of 1848.''
But 1848 was also the great year of revolutions, and perhaps in that spirit of defiance the critics had few kind words for Millet's work. It was to be his last brush with academic history painting, and marked his transition to the peasant and agricultural scenes for which he is best known today.
''What was unusual was that none of the people who knew Millet, and even later wrote about his life, had seen or remembered this picture,'' Ms. Murphy says.
She suggests Millet (pronounced mee-yeah) must have packed the painting off to his family's home in Normandy and stashed it away in an attic for 30 years. With canvas in short supply during the Franco-German War of 1870, Millet ''had a good reason to use the old canvas,'' she explains.
''The Captivity of the Jews in Babylon'' was never seen again - that is, until Pam England, a research scientist at the museum, made an X-ray of one section of ''The Young Shepherdess'' and discovered a confusing tangle of arms bearing no relation to the shepherdess.
Ms. Murphy says ''the X-ray was made almost as an afterthought'' in a routine preparation for a major exhibition of Millet's work at the museum in March.
The scientists had expected to find pentimenti in the picture - an Italian word referring to compositional changes made by an artist as he changes his mind during painting. Pentimenti - such as hands or arms in several different positions - are not unusual and show up often in X-rays because of the lead in white paint pigment.
''As soon as she (Mrs. England) said 'a lot of arms' over the phone, I knew this was the missing one,'' Ms. Murphy says.
A full-scale X-ray of the complete picture has now been pieced together, and the museum may exhibit the composite X-ray next to ''The Young Shepherdess'' during the exhibition's run from March to July.
The use of X-rays to authenticate and inspect paintings is not new. The X-radiograph (its true technical term) was invented in 1895 and used for the first time with artwork in 1897.
Pentimenti are fairly common, too, and conservators say they are not so much surprised as pleased when they find them. The Millet is unusual, they explain, because instead of small compositional changes, an entirely different picture was discovered - and a picture that had been publicly exhibited as well.
If X-rays have existed for almost 100 years, why was the missing Millet - hanging innocently in a major museum's collection - only discovered in 1984?
Because, art experts explain, museums are just beginning to have major retrospectives of artists such as Picasso, Chardin, Manet, Monet, or in this case, Millet. Such an exhibition involves massive research, catalog preparation, and routine cleaning or restoration of the paintings - some of which may be on loan from private individuals or smaller institutions. With so many paintings and so much information under one roof, such discoveries may become more common, specialists suggest.
In the past few years, X-rays have turned up equally exciting finds in the art world:
* ''Family of the Saltimbanques'' is a similar ''transitional'' painting marking Pablo Picasso's move from his ''blue'' period to his ''rose'' period. E. A. Carmean, curator of 20th-century art at the National Gallery in Washington, says he spent a ''very heady summer'' in 1980 discovering with X-rays that the enormous painting (8 by 8 feet) recorded four distinct stages painted between December 1904 and December 1905.
The first composition - like a ''snapshot of circus performers backstage,'' Mr. Carmean says - was thought to have disappeared. Picasso apparently reduced the painting in its second stage to two boys in the middle of the canvas. His final painting - reworked almost a year later and altered twice - now has five circus figures standing in an empty field.
* Harvard University's Fogg Art Museum has two such unusual paintings. One is Picasso's ''Maternite'' (1901), painted in his blue period. X-rays have revealed a portrait of his friend Max Jacob beneath it.
The other is Vincent van Gogh's ''Three Pairs Shoes'' (1887), in which X-rays revealed a complete painting of sunflowers in a vase. ''He couldn't afford canvas; an artist with money doesn't do that,'' explains Arthur Beale, director of the Center for Conservation and Technical Studies at the Fogg. (The center has X-rays of more than 4,000 paintings - one of the largest collections in the world.)
* The Metropolitan Museum of Art in New York has in its collection a picture by Sir Anthony Van Dyck - ''St. Rosalie Interceding for the Plague-Stricken in Palermo'' - in which X-rays reveal an early self-portrait beneath.
* The National Gallery's Carmean also tells of two missing ''diamond (shaped)'' paintings by Piet Mondrian. The museum had a Mondrian similar to an earlier picture by the Dutch artist that had been photographed and described in the 1920s. Its whereabouts had been unknown ever since. Recently, X-rays showed up shifts in lines as well as areas where paint had been scraped away. By using a very very fine needle inserted into the canvas, ''much like taking geological core samples,'' Mr. Carmean says, a white ground and then blue paint were discovered beneath the black on the surface.
Finding missing masterpieces under equally masterly overcoats raises a major question: Should the art world peel time and paint back to get to the earlier picture?
''Absolutely not!'' says Lambertus Van Zelst, director of the Boston Museum of Fine Arts research laboratory. ''It is physically too difficult to remove a layer of paint without destroying both pictures.''
So while the mystery of the missing Millet has been solved, ''The Captivity of the Jews in Babylon'' will only be seen as a black-and-white X-ray image - ironically, since almost the only praise to come out of the Salon of 1848 for Millet's effort was for his use of color.