When British mathematician Andrew Wiles proved Fermat's last theorem in 1994, he ended a saga that had begun in the middle of the 17th century. But like a good storyteller, he left unanswered a tantalising question. Now, five years later, four mathematicians have managed to answer that question.

Brian Conrad and Richard Taylor of Harvard University, Christophe Breuil of the Universit de Paris-Sud, and Fred Diamond of Rutgers University announced recently that they had finally managed to build on Wiles's work to prove the Shimura-Taniyama conjecture. To understand what this means, it's best to start at the beginning of the Fermat story.

Pierre de Fermat - a French lawyer whose hobby was mathematics - was one of the most famous mathematicians of all time. In 1670, looking through his father's papers five years after his death, his son came across a note scribbled in the margin of a textbook. The note claimed that the equation xn + yn = zn has no (whole-number) solutions for any power n greater than 2.

(Mathematicians ignore the trivial solutions that arise when one of the unknowns is allowed to be zero. For n = 2, the equation is related to Pythagoras's theorem about right-angle triangles, and has many whole number solutions; x = 3, y = 4, z = 5 being one such.) So began a saga that continued until late in 1994, as mathematician after mathematician, professional and amateur, attempted to produce a proof - and failed. It was its very resistance to proof that led to the theorem's fame, and attracted many amateur maths buffs to have a go. Experts all agree that there is little likelihood of a proof using high school techniques, however. Wiles's proof involved some remarkable new results that have opened up a completely new area of mathematics.

Wiles started with an idea put forward by the Japanese mathematician Yutaka Taniyama in 1955. Taniyama was studying elliptic curves; these are curves having an equations of the form y2 = x3 + Ax2 + Bx + C. Taniyama suggested that every elliptic curve has a (fairly technical) property known as modularity. It was a bold claim, with very little to back it up. But in 1971, another Japanese mathematician, Goro Shimura, showed that Taniyama's suggestion was true at least for a very special class of elliptic curves. With this partial evidence in hand, Taniyama's original suggestion gained credibility, and became known as the Shimura-Taniyama conjecture.

At the time, no one suspected there would be any connection between this very abstract conjecture and Fermat's last theorem. But, in 1986, German mathematician Gerhard Frey noticed that Fermat's last theorem might be a direct consequence of the Shimura-Taniyama Conjecture.The American mathematician Kenneth Ribet proved Frey right: the Shimura-Taniyama conjecture implied Fermat's last theorem. Ribet's remarkable result was electrifying.

The Shimura-Taniyama conjecture concerned geometric objects about which a great deal was known. Indeed, by then there was good reason to believe the conjecture. There were also some obvious - but daunting - ways to set about finding a proof. At last, mathematicians had a powerful framework with which to approach the last theorem. Among those who took up the challenge was Andrew Wiles, who by then was a professor of mathematics at Princeton University in New Jersey. Wiles had been fascinated with Fermat's last theorem since childhood, when he had attempted to solve the problem using high school mathematics. For the next seven years, Wiles concentrated his efforts on finding a way to prove the Shimura-Taniyama conjecture. By 1991, he felt sure he could prove not the entire conjecture, which applies to all elliptic curves, but a special case of the conjecture that applies to elliptic curves of a particular kind. In 1993, after a further two years effort, he eventually succeeded in doing just that.

Believing that the class of elliptic curves for which his proof worked included those necessary to deduce the last theorem, in June 1993 Wiles announced he had solved Fermat's last theorem. He was wrong. By December of that year, he had to admit that his argument did not seem to work for the "right" elliptic curves. Though everyone agreed that his achievement was one of the most significant advances in number theory in the 20th century, it appeared that he was destined to follow in the footsteps of the many illustrious mathematicians , including perhaps Fermat himself, who had dared rise to the challenge in Fermat's marginal note. Fermat's last theorem remained unproved.

Several months of silence followed, while Wiles retreated to his Princeton home to try to make his argument work. In October 1994 came the announcement that he had succeeded. All the experts agreed he was right. That was not the end of the story. Wiles's new proof showed that "many" elliptic curves are modular, as did his original, faulty proof. And this time, among the elliptic curves for which his proof worked were the ones required to provide Fermat's last theorem.

The question remained, however: Was every elliptic curve modular, as the full Shimura-Taniyama conjecture proposed? Before Wiles's work, most experts had come to the conclusion that the full conjecture was probably true, but no one had the slightest idea how to prove it. Indeed, Ribet believed it would not be proved within his lifetime. So great was Wiles's work, however, that, after his 1994 proof had been acknowledged to be correct, those same experts felt it would not be long before the new methods were strengthened to prove the full conjecture.

The hunt was on. It took just five years to resolve the matter. Building on Wiles's work, Conrad, Taylor, Breuil, and Diamond have now shown that Taniyama was entirely correct: every elliptic curve is modular. This marks the start of a whole new era of research in number theory. For whereas Fermat's last theorem itself was little more than a curiosity from the 17th century, having no significant consequences, the Shimura-Taniyama conjecture is a rich and powerful result offering the potential for a great many wide-ranging applications. For number theorists, the proof of the Shimura-Taniyama conjecture is a fitting end to the 20th century that appropriately sets the stage for the new millennium.

 Keith Devlin is dean at the school of science, Saint Mary's College of California, Moraga.