Defender of the Faith (Latin: Fidei Defensor or, specifically feminine, Fidei Defensatrix; French: Défenseur de la Foi) is a phrase that has been used as part of the full style of many English and later British monarchs since the early 16th century. It has also been used by some other monarchs and heads of state.
The earliest use of the term appears in 1507, when King James IV of Scotland was granted the title of "Protector and Defender of the Christian Faith" by Pope Julius II. The title was conferred on James IV by the papal legate Robert Bellenden in a lavish ceremony in Holyrood Abbey.
"Defender of the Faith" has been one of the subsidiary titles of the English and later British monarchs since it was granted on 11 October 1521 by Pope Leo X to King Henry VIII. His wife Catherine of Aragon also used the title. The title was conferred in recognition of Henry's book Assertio Septem Sacramentorum (Defence of the Seven Sacraments), which defended the sacramental nature of marriage and the supremacy of the pope. This was also known as the "Henrician Affirmation" and was seen as an important opposition to the early stages of the Protestant Reformation, especially the ideas of Martin Luther.
Following Henry's decision to break with Rome in 1530 and establish himself as head of the Church of England, the title was revoked by Pope Paul III (since Henry's act was regarded as an attack on "the Faith") and Henry was excommunicated. However, in 1543, the Parliament of England conferred the title "Defender of the Faith" on King Henry VIII and his successors, now the defenders of the Anglican faith, of which they (except the Catholic Mary I) remain the supreme governors.
King James V of Scotland was granted the title of "Defender of the Faith" by Pope Paul III on 19 January 1537, symbolizing the hopes of the papacy that the King of Scots would resist the path that his uncle Henry VIII had followed. Neither this title nor James IV's title of "Protector and Defender of the Christian Faith" became part of the full style of the monarch of Scotland.
During The Protectorate (1653–59), the republican heads of state Oliver Cromwell and Richard Cromwell, more clearly profiled as Protestant than the monarchy, although claiming divine sanction, did not adopt the style "Defender of the Faith". The style was reintroduced after the restoration of the monarchy and remains in use to this day.
In her capacity as queen of the United Kingdom, Elizabeth II is styled "Elizabeth the Second, by the Grace of God, of the United Kingdom of Great Britain and Northern Ireland and of Her other Realms and Territories Queen, Head of the Commonwealth, Defender of the Faith". The title "Defender of the Faith" reflects the Sovereign's position as the supreme governor of the Church of England. The original Latin phrase Fidei Defensor is represented on all current British coins by the abbreviations, F D or FID DEF. This notation was first added to British coins in 1714, during the reign of King George I. The decision of the Royal Mint to omit this and certain other parts of the monarch's style from the "Godless Florin" in 1849 caused such a scandal that the coin was replaced.
In most Commonwealth realms, the phrase does not appear in the Monarch's full style, though the initial "By the Grace of God" is maintained. For example, in Australia, Queen Elizabeth is currently styled "by the Grace of God, Queen of Australia and Her other Realms and Territories, Head of the Commonwealth". She is additionally styled "Defender of the Faith" only in Canada, New Zealand and the UK. Canada chose to include the phrase not because the sovereign is regarded as the protector of the state religion (Canada has none), but as a defender of faith in general. In a speech to the House of Commons in 1953, Prime Minister Louis St. Laurent stated:
The rather more delicate question arose about the retention of the words, "Defender of the Faith". In England there is an established church. In our countries [the other monarchies of the Commonwealth] there are no established churches, but in our countries there are people who have faith in the direction of human affairs by an all-wise providence, and we felt that it was a good thing that the civil authorities would proclaim that their organisation is such that it is a defence of the continued beliefs in a supreme power that orders the affairs of mere men, and that there could be no reasonable objection from anyone who believed in the Supreme Being in having the sovereign, the head of the civil authority, described as a believer in and a defender of the faith in a supreme ruler.— Louis St. Laurent
However, the style used on Canadian coinage is simply D.G. Regina (Dei Gratia Regina, "By the Grace of God, Queen").
In Australia, the monarch held the title "Defender of the Faith" until 1973, when it was formally removed. (The words "by the Grace of God" were retained, however.)
At various times, some countries of the Commonwealth retained the title until they formally became republics, e.g. South Africa from 29 May 1953. Others dropped it even sooner, e.g. in 1953, while still a dominion of the Commonwealth (until 1956), Pakistan dropped the title in recognition of the contradiction between its overwhelmingly Muslim population and having a monarch as the defender of the Christian faith.
Charles, Prince of Wales, the present heir apparent, expressed a preference to change the spirit of this role should he succeed to the throne as expected. He commented in 1994, "I personally would rather see [my future role] as Defender of Faith, not the Faith", and clarified in 2015 that "while at the same time being Defender of the Faith you can also be protector of faiths".
In 1811 when he proclaimed himself king, Henri I of Haiti awarded himself the title, "le défenseur de la foi", and incorporated it into his full style: [note 1]
par la grâce de Dieu et la loi constitutionnelle de l'état, roi du Haïti, souverains de Tortuga, Gonâve et d'autres îles adjacentes, destroyer de tyrannie, régénérateur et bienfaiteur de la nation de Haitian, créateur de ses établissements moraux, politiques et de Martial, le premier a couronné le monarque du nouveau monde, le défenseur de la foi, fondateur de la commande royale et militaire de Saint-Henry
which translates to English as:
by the Grace of God and the Constitutional Law of the State, King of Haiti, Sovereign of Tortuga, Gonâve and other adjacent Islands, Destroyer of Tyranny, Regenerator and Benefactor of the Haitian Nation, Creator of her Moral, Political and Martial Institutions, First Crowned Monarch of the New World, Defender of the Faith, founder of the Royal and Military Order of Saint-Henry
See also: Title and style of the Canadian monarch
The French variant is used as part of the official French-language version of the monarch's style in Canada: "Elizabeth Deux, par la grâce de Dieu Reine du Royaume-Uni, du Canada et de ses autres royaumes et territoires, Chef du Commonwealth, Défenseur de la Foi."
In 1684, Pope Innocent XI granted the honorary title Defensor Fidei (Polish: Obrońca Wiary) to John III Sobieski, king of Poland, who took the supreme command of the Christian Coalition army during the Battle of Vienna, considered as a turning point in history of Europe, preventing her from being conquered by the Ottoman Empire.
One of the titles of Haile Selassie I, Emperor of Ethiopia, was Defender of the Faith.
One of the titles bestowed to Shivaji, the first Chhatrapati of the Maratha Empire, was Haindava Dharmodhhaarak, which means Defender of Hinduism. 
In Sunni Islam, the historical leader of the faith was a secular ruler, rather than a spiritual one. The title of this leader was Caliph, deriving from the Arabic Khalifah, which means something like "steward", "deputy", or "successor" (as the Caliph was the successor to the Prophet Muhammad, and the steward of his community on Earth). An additional title used by Caliphs was Amir al-Mu'minin, meaning "Commander (Emir) of the Faithful". This title is still used by leaders who have historically claimed the Caliphate but officially do so no longer, like the King of Morocco and the Sultan of Sokoto. The secular ruler responsible for the maintenance and stewardship of the Masjid al-Haram in Mecca and the Mosque of the Prophet in Medina, as well as protecting the Hajj pilgrimage and its rituals, is called the Custodian of the Two Holy Mosques. This title is currently held by the King of Saudi Arabia.
In Nizari Shia Islam, the leader of the faith is known as the Agha-Khan. The word "agha" means "master" or "lord," and "khan" is a title of rulership in Turkic and Mongolic cultures.
The leaders of various micronations, such as the Christian emperor of Austenasia, have also assumed the title.
The monarchs of other countries have received similar titles from the pope: