Pierre de Fermat died in 1665. Today we think of Fermat as a number theorist, in fact as perhaps the most famous number theorist who ever lived. It is therefore surprising to find that Fermat was in fact a lawyer and only an amateur mathematician. Also surprising is the fact that he published only one mathematical paper in his life, and that was an anonymous article written as an appendix to a colleague’s book.
Because Fermat refused to publish his work, his friends feared that it would soon be forgotten unless something was done about it. His son, Samuel undertook the task of collecting Fermat’s letters and other mathematical papers, comments written in books, etc. with the object of publishing his father’s mathematical ideas. In this way the famous ‘Last theorem’ came to be published. It was found by Samuel written as a marginal note in his father’s copy of Diophantus’s Arithmetica. … (Turnbull)
You can download Wiles’paper here.