The Man in the Iron Mask (; died 19 November 1703) was an unidentified prisoner of state during the reign of Louis XIV of France (1643–1715). The strict measures taken to keep his imprisonment secret resulted in a long-lasting legend about his identity. Warranted for arrest on 19 July 1669 under the name of "Eustache Dauger", he was apprehended near Calais on 28 July, incarcerated on 24 August, and held for 34 years in the custody of in four successive French prisons, including the Bastille. He died there on 19 November 1703, and his burial certificate bore the name of "Marchioly", leading several historians to conclude that the prisoner was Italian diplomat Ercole Antonio Mattioli.

His true identity remains a mystery, even though it has been extensively debated by historians, and various theories have been expounded in numerous books, articles, poems, plays, and films. During his lifetime, it was rumoured that he was a Marshal of France or a President of Parlement, the Duke of Beaufort, or a son of Oliver Cromwell, and some of these rumours were initiated by Saint-Mars himself. Among the oldest theories is one proposed by French philosopher and writer Voltaire, who claimed in his (1771) that the prisoner was an older, illegitimate brother of Louis XIV. Other writers believed that he was the King's twin or younger brother. In all, more than 50 candidates, real and hypothetical, have been proposed by historians and other authors aiming to solve the mystery.

What little is known about the prisoner is based on contemporaneous documents uncovered during the 19th century, mainly some of the correspondence between and his superiors in Paris, initially Louvois, Louis XIV's secretary of state for war. These documents show that the prisoner was labelled "only a valet" and that he was jailed for "what he was employed to do" before his arrest, and for "what he knew." Legend has it that no one ever saw his face, as it was hidden by a mask of black velvet cloth, later misreported by Voltaire as an iron mask. Official documents reveal, however, that the prisoner was made to cover his face only when travelling between prisons after 1687, or when going to prayers within the Bastille in the final years of his incarceration; modern historians believe that the measure was imposed by Saint-Mars solely to increase his own prestige, thus causing persistent rumours to circulate about this seemingly important prisoner.

In 1932, French historian Maurice Duvivier proposed that the prisoner was Eustache Dauger de Cavoye, a nobleman associated with several political scandals of the late 17th century. This solution, however, was disproved in 1953 when previously unpublished family letters were discovered by French historian , who concluded that the enigma remained unsolved.

He has been the subject of many works of fiction, most prominently Alexandre Dumas' 1850 novel The Vicomte of Bragelonne: Ten Years Later—the final installment of his D'Artagnan saga—which portrays the prisoner as Louis XIV's identical twin. In 1840, Dumas had first presented a review of the popular theories about the prisoner extant in his time in the chapter "L'homme au masque de fer," published in the eighth volume of his non-fiction Crimes Célèbres. This approach was adopted by many subsequent authors, and speculative works have continued to appear on the subject.

The prisoner "whose name is not spoken" Arrest and imprisonment – Pignerol (1669–1681)

The earliest surviving records of the masked prisoner are from 19 July 1669, when Louis XIV's minister, the Marquis de Louvois, sent a letter to Bénigne Dauvergne de Saint-Mars, governor of the prison of Pignerol (which at the time was part of France). In his letter, Louvois informed Saint-Mars that a prisoner named "Eustache Dauger" was due to arrive in the next month or so.

He instructed Saint-Mars to prepare a cell with multiple doors, one closing upon the other, which were to prevent anyone from the outside listening in. Saint-Mars was to see Dauger only once a day to provide food and whatever else he needed. Dauger was to be told that if he ever spoke of anything other than his immediate needs he would be killed, but, according to Louvois, the prisoner should not require much since he was "only a valet". Historians have noted that the name "Eustache Dauger" was written in a handwriting different from that used in the rest of the letter's text, suggesting that a clerk wrote the letter under Louvois' dictation, while someone else, very likely Louvois, added the name afterward.

Dauger was arrested on 28 July by Captain Alexandre de Vauroy, garrison commander of Dunkerque, and a small escort of three soldiers, who took him to Pignerol, where he arrived on 24 August. Evidence has been produced to suggest that the arrest was actually made in Calais and that not even the local governor was informed of the event—Vauroy's absence being explained away by his hunting for Spanish soldiers who had strayed into France via the Spanish Netherlands. The first rumours of the prisoner's identity (specifically as a Marshal of France) began to circulate at this point.

Saint-Mars's other prisoners The dungeon at Pignerol was used to incarcerate men who had displeased Louis XIV or were considered an embarrassment to the state, and it usually held only a few important prisoners at a time.

Saint-Mars's first prisoner of state at Pignerol was Nicolas Fouquet, Marquis of Belle-Île, a former superintendent of finances who had been arrested on 5 September 1661 and tried by order of Louis XIV on the charge of embezzlement. On 27 December 1664, after a long trial, Fouquet was transferred—by d'Artagnan leading a company of 100 musketeers—from the Bastille to Pignerol, where he arrived on 16 January 1665 and was lodged in the Angle Tower. In 1665, Saint-Mars commanded a new compagnie franche, created solely to guard Fouquet, which comprised four officers (including three musketeers detached from their original corps), 11 non-commissioned officers and 50 soldiers.

Two years after Dauger's arrival in August 1669, Saint-Mars's third prisoner was the Marquis de Lauzun, a favourite of Louis XIV, who had fallen from grace for lying to the King and insulting his mistress, Madame de Montespan. For this, Lauzun was arrested on 25 November 1671 and, with an escort of 100 musketeers led once again by d'Artagnan, was brought to Pignerol on 16 December of that year, and lodged in rooms directly under Fouquet's cell. At that time, the strength of Saint-Mars's company was increased from 65 to 135 men, officers included.

A Dominican monk, nicknamed Lapierre, was brought to Pignerol on 7 April 1674. He was a swindler, dabbling in alchemy, who had abused the trust of several ladies at court, including the wife of Louis de Lorraine, one of the Great Officers of the Crown of France and a member of the King's Household. Soon after his incarceration, Lapierre became insane, screaming hysterically, fouling his cell, and insulting his guards. In May 1676, Saint-Mars received a fifth prisoner, named Dubreuil, a private agent specialising in military espionage, who was discovered to be in the pay of the Austrian and Spanish governments as well as the French. Louvois had ordered his kidnapping on 25 February and Dubreuil was caught on 24 April. Another prisoner was Count Ercole Antonio Mattioli, an Italian diplomat who had double-crossed Louis XIV over the purchase of the important fortress town of Casale on the Mantuan border. Mattioli was kidnapped near Turin by a small team of French soldiers commanded by Nicolas Catinat, and incarcerated at Pignerol on 2 May 1679. Mattioli's Italian valet, named Rousseau, was also arrested and taken to Pignerol two days later. (French historian Jean-Christian Petitfils suggested that "Rousseau" might have been a francisation of the name "Rosso").

Dauger serves as a valet (1675–1680) In his letters to Louvois, Saint-Mars describes Dauger as a quiet man, giving no trouble, "disposed to the will of God and to the King", compared to his other prisoners, who were always complaining, constantly trying to escape, or simply mad. Dauger was not always isolated from the other prisoners. Wealthy and important ones usually had manservants; for instance, Fouquet was granted the service of two men in 1667, called Champagne and La Rivière, and Mattioli had been joined by his Italian valet, Rousseau, incarcerated with him in 1679. These servants, however, would become as much prisoners as their masters and it was thus difficult to find people willing to volunteer for such an occupation. When Lauzun arrived in December 1671, Saint-Mars could not find him a manservant, and therefore wrote to Louvois on 20 February 1672, suggesting that Dauger would prove a good valet for Lauzun. This request was turned down, and historians believe Louvois had reasons to keep these two men apart; perhaps they knew each other.

In 1674, Champagne died and, since La Rivière was often ill, Saint-Mars again applied for permission for Dauger to act as servant, this time for Fouquet. On 30 January 1675, Louvois gave permission for such an arrangement on strict condition that he was to serve Fouquet only while La Rivière was unavailable and that he was not to meet anyone else; for instance, if Fouquet and Lauzun were to meet, Dauger was not to be present. This injunction was reiterated by Louvois to Saint-Mars in a stern letter dated 11 March 1675. Fouquet was never expected to be released; thus, meeting Dauger was no great matter, but Lauzun was expected to be set free eventually, and it would have been important not to have him spread rumours of Dauger's existence or of secrets he might have known. Shortly thereafter, Dauger was moved from the Lower Tower to the Angle Tower, where he was lodged with La Rivière. The important fact that Dauger served as a valet to Fouquet strongly indicates he was born a commoner.

On 23 November 1678, Louvois wrote directly to Fouquet to inform him that the King was disposed to soften considerably the strictures of his incarceration, subject to Fouquet writing back to Louvois—without informing Saint-Mars of the contents of his reply—concerning whether or not Dauger had talked to him, Fouquet, in front of La Rivière, "about what he was employed to do before being brought to Pignerol". From this revealing letter, French historian Mongrédien concluded that Louvois was clearly anxious that any details about Dauger's former employment should not leak out if the King decided to relax the conditions of Fouquet's or Lauzun's incarceration.

After Fouquet's death on 23 March 1680, Saint-Mars discovered a secret hole between Fouquet and Lauzun's cells. He was sure that they had communicated through this hole without detection by him or his guards and thus that Lauzun must have been made aware of Dauger's existence. On 8 April 1680, Louvois therefore wrote to Saint-Mars and instructed him to move Lauzun to Fouquet's cell and to tell him that Dauger and La Rivière had been released, after secretly relocating them to a new cell in the Lower Tower of Pignerol's dungeon. They became henceforth identified in official correspondence only as "the gentlemen of the lower tower" ("les messieurs de la tour d'en bas"). After Fouquet's death, the strength of Saint-Mars's company was decreased from 135 to 65 men, officers included.