In 1516, after the victory at Marignane, King Francis I stopped in Marseilles, where he drew attention to the fact that the city does not protected from possible attacks. The King praised the strategic importance of the island and ordered to build a fortress. However, 8 years later, Marcel was still defenseless and at that time, the city was besieged by the forces of Holy Roman Emperor Charles V under the command of Charles of Bourbon, a former military leader of France, who crossed over to the Holy Roman Empire. Marcel heroically defended, and after several months of Bourbon was forced to retreat. This case showed the need to strengthen the approaches to the city. The château was built in 1524-1531. However, its construction was extremely controversial. When Marseille was annexed to France in 1481, it retained the right to provide for its own defence. Therefore, the castle was seen by many of the local inhabitants as an unwanted imposition of central authority. And when, after an attack of Admiral Doria, which also passed to Charles V, the island housed a garrison of 200 soldiers and 22 pieces of artillery, residents also did not cease to protest against the deployment of the castle.
The castle's principal military value was as a deterrent, but it had never been attacked. The closest that it came to a genuine test of strength was in July 1531, when the Holy Roman Emperor Charles V made preparations to attack Marseille. However, he abandoned the invasion plan, perhaps deterred by the presence of the castle.
This was perhaps fortunate, given the weaknesses identified by the military engineer Vauban in a scathing report in 1701: "The fortifications look like the rock, they are fully rendered, but very roughly and carelessly, with many imperfections. The whole having been very badly built and with little care…"
The Chateau d'If was the ideal place to keep dangerous prisoners. The isolated location and hazardous coastal streams made escapes virtually impossible. So, in 1580, the fortress became a state prison. The first prisoner of the Chateau d'If was named Chevalier Anselm, accused of plotting against the French crown. He was found strangled in his cell.
After the abolition of the Edict of Nantes, in 1696-1713, during the religious wars of the prison were kept many Protestant Huguenots. At that time, the social differences existed even for the prisoners. Not everyone had equal rights. The prisoners of the upper chamber in the Chateau d'If, which had the ability to pay, were free to speak and to walk on the floor of the main tower.
They lived comparatively comfortably in their own private cells (or pistoles) higher up, with windows, a garderobe and a fireplace. The poorest were literally placed at the bottom, being confined to a windowless dungeon under the castle. In these cells, located deep underground, separated from the rest of the world grid, which badly missed the air ventilation, was terrible. It was cold in winters and stifling in summers.
Over 3,500 Huguenots (French Protestants) were sent to If, as was Gaston Crémieux, a leader of the Paris Commune, who was shot there in 1871.
The island became internationally famous in the 19th century when Alexandre Dumas used it as a setting for The Count of Monte Cristo, published to widespread acclaim in 1844. In the book, the main character Edmond Dantès (a commoner who later purchases the noble title of Count) and his mentor, Abbé Faria, were both imprisoned in it. After fourteen years, Dantès makes a daring escape from the castle, becoming the first person ever to do so and survive. In reality, no one is known to have done this. The modern Château d'If maintains adjacent cells named after Dantès and Faria as a tourist attraction.
At the end of 19th the Chateau d'If ceased to perform the functions of the prison and September 23, 1890, it was opened to the public. Decree of 7 July 1926 the castle was declared a historic monument. During World War II the Germans occupied the Chateau d'If, in consequence, it suffered from the bombing in 1944.
This is a file from the Wikimedia Commons,
Currently, the Chateau d'If is a "visiting card" of Marseille. Its fame as the setting for Dumas' novel has made it a popular tourist destination. It can now be reached by boat from Marseille's old port. In the castle there are excursions to cells, selling souvenirs, and in the open area is a cafe with a view of Marseille.
The Château d'If is listed as a monument historique by the French Ministry of Culture.