In April 2005, Joseph Ratzinger was selected as the successor to Pope John Paul II.
Pope Benedict XVI was the first German pope since the middle ages and was also the first pope to retire from the position in almost 600 years.
Born in Bavaria, in 1927, Joseph was the youngest of three children. His father was a policeman and before she married, his mother was a hotel cook. They were devout Catholics.
His father opposed fascism, but Joseph's generation was coerced into Hitler youth and conscripted into the forces.
In 1943, Ratzinger and fellow seminarians were drafted into the anti-aircraft corps.

In late April 1945, he returned to the seminary at the University of Munich where he earned a doctorate and was ordained in 1951.
A theologian and an academic, he earned his teaching licentiate in 1957 and became a professor of Freising College in 1958, teaching dogma and fundamental theology.
At the second Vatican council, he championed reform, but the student revolts of the 1960s resulted in him joining those who were trying to put the brakes on the liberalising forces unleashed by the counterculture movement.
In 1977, Joseph Ratzinger became Munich's cardinal archbishop.
Andreas Englisch, a leading German Vatican expert and the author of several books on Benedict, noted that when he was first asked to be archbishop of Munich, Cardinal Ratzinger considered turning down the post because he did not want to work as "a manager".
In his autobiography, Benedict described taking the post as "an infinitely difficult decision". He took up the role and his elevation within the Catholic Church continued.
In 1981, Pope John Paul II named him as prefect of the Congregation for the Doctrine of the Faith, which seeks to promote and safeguard the faith.
He became vice dean of the College of Cardinals in 1998 and was elected dean in 2002.
Joseph Ratzinger defended and reaffirmed Catholic doctrine including teaching on topics such as birth control, homosexuality and inter-religious dialogue.
He led crackdowns on liberation theology and the push for women's ordination.
He first coined the expression "dictatorship of relativism" before the conclave in April 2005 that elected him to the papacy.
This was widely seen as a manifesto by the then-Cardinal, outlining what he saw as the central challenge facing the faith.
Read more:
Vatican announces death of Emeritus Pope Benedict
Retired pope was rarely seen - but he was heard
Tributes paid to Emeritus Pope for his theological work
On 19 April he was elected the 265th pope at the age of 78, becoming the oldest pope since Pope Clement XII (1730-1740).
A year into his papacy, Pope Benedict caused controversy when he quoted a 14th-century Christian emperor in comments that offended Muslims, resulting in the Vatican scrambling to rectify the situation by saying that it was not the intention of the Pope to offend the sensibility of Muslim believers.
In 2008, he sought to foster relations and understanding between religions by addressing the first Catholic-Muslim Forum, a three-day conference of Catholic theologians and Islamic scholars.
Benedict was popular among conservatives; however, his pontificate was overshadowed by attempts to halt the scandal caused by child abuse.
He banished the founder of Legionaries of Christ Fr Marcial Maciel, who John Paul II had protected despite a string of allegations.
In 2010, he summoned the Irish bishops to Rome following the Ryan and Murphy exposés of endemic abuse and cover ups.
Writing to Catholics here, he apologised to the abused and criticised church leaders for "grave errors of judgement" by failing to respond adequately to allegations of abuse.
He sent Boston's Cardinal Sean O'Malley and others to scrutinise the Irish church, including the Dublin Diocese. Their report lamented fairly widespread descent from church teaching here, but it praised its child protection.
In the Vatican's summary of the investigation, it said it recommended better screening and education of priests, adding that the investigation found there was an inadequate understanding of and reaction to the abuse of minors.
It also said that since the 1990s, progress has been made in understanding and dealing with the problem of abuse.
Months later, the then-Taoiseach Enda Kenny strongly criticised the Vatican for what he said was an attempt to frustrate the Cloyne inquiry, accusing it of downplaying the rape of children to protect its power and reputation.
Mr Kenny told the Dáil that the Catholic Church needed to be truly and deeply penitent for the wrongdoing it perpetrated, hid and denied.
The speech was described by abuse survivors as "groundbreaking and extraordinary".

The fallout from the child abuse scandal also impacted Benedict's home country of Germany.
When he was accused of allowing a priest abuser to access children in Munich during his time as Archbishop, a former diocesan deputy accepted responsibility.
The year 2012 brought Vatileaks – leaked documents that revealed allegations of extensive cronyism and money laundering.
They revealed that a mid-ranking Archbishop was deflected from cleaning up corruption in the Vatican by a mysterious transfer to Washington DC.
The source of the leak was discovered to be the pope's butler, Paolo Gabriele, who admitted to exposing the private correspondence out of fear that corruption was overtaking the Church.
Sentenced to 18 months in prison by a Vatican court, he was pardoned by the end of 2012 by Benedict.
In February 2013, at the age of 85, Pope Benedict caused a sensation by becoming the first pope in seven centuries to resign.
"I have come to the certainty that my strengths, due to an advanced age, are no longer suited to an adequate exercise," he said in a statement.
"In today's world, subject to so many rapid changes and shaken by questions of deep relevance for the life of faith, in order to govern the bark of St. Peter and proclaim the gospel, both strength of mind and body are necessary, strength which in the last few months has deteriorated in me to the extent that I have had to recognise my incapacity to adequately fulfill the ministry entrusted to me.
"For this reason, and well aware of the seriousness of this act, with full freedom, I declare that I renounce the ministry of bishop of Rome, successor of St. Peter."

The Pope emeritus, who continued to be known by his papal title of Benedict XVI, took up residence at a former convent known as Mater Ecclesiae in the south-west corner of Vatican City.
As Pope Francis settled into the role of Pope, Benedict settled into retirement.
In late 2018, Benedict wrote a text over a number of days which was subsequently published by an Italian newspaper which sought to clear up any confusion over his role as Pope Emeritus.
The article quoted Benedict as saying: "There is one pope, he is Francis".
In 2019, he published reflections on the scandal of sex abuse in the Church, saying it was made possible by a progressive eclipse of faith in God.
The following year he defended priestly celibacy after it emerged the ordination of married men as priests in the Amazon region was under consideration.
Some historians say that, for all of Benedict's theological work, it is his resignation that will most come to define his legacy.
His behind-the-scenes role as Pope Emeritus will be a matter for historians.
In February this year, the Vatican published a letter by Pope Emeritus Benedict in response to the report on abuse in the Archdiocese of Munich-Freising which he headed between 1977 to 1982.
The report by a German law firm, which had been commissioned by the German church, looked into how cases of sexual abuse were handled in the Munich archdiocese between 1945 and 2019.
The report was published in January.
It found fault with the former Cardinal Joseph Ratzinger's handling of four cases of abuse when he was an archbishop in the 70s and 80s.
It accused him of misconduct for having failed to restrict the ministry of the priests in the cases after they had been convicted criminally.
The report also criticised his predecessors and successors, estimating that there had been at least 497 abuse victims over the decades and at least 235 suspected perpetrators.

In a letter published by the Holy See, the retired pope expressed his profound shame, deep sorrow and offered a heartfelt request for forgiveness to all the victims of sexual abuse.
He noted his responsibilities in the Catholic Church and said his pain was greater for the abuses and the errors that occurred in those different places during the time of his mandate.
"Each individual case of sexual abuse is appalling and irreparable. The victims of sexual abuse have my deepest sympathy and I feel great sorrow for each individual case", he said.
Along with Benedict XVI's letter, a short three-page annex by the four legal experts, who had already been involved in drafting the 82-page response to the abuse report, was published.
That response stirred up controversy when a transcription error led to the assertion of Archbishop Ratzinger's absence at the meeting in which it was decided to accept a priest who had been guilty of abuse.
The reason for the error regarding Archbishop Ratzinger's initially denied presence according to the legal experts was because only one of them, Professor Stefan Mückl, was allowed to view the acts in electronic version, without being allowed to save, print, or photocopy documents.
In the subsequent phase of processing, Dr Stefan Korta inadvertently made a transcription error asserting that the former Cardinal was absent on 15 January 1980.
In 2010, several news articles spoke of Cardinal Ratzinger's presence at the meeting as did a biography written by Peter Seewald published in 2020.
In their three-page annex published in February, the legal experts reiterated that when he accepted the transfer of the priest who was to be treated in Munich, Cardinal Ratzinger was not aware that he was an abuser.
They also deny that the responses they drafted on behalf of the Pope Emeritus downplayed the seriousness of a priest's exhibitionist behavior.
"In his memoir, Benedict XVI did not minimise the exhibitionist behaviour but expressly condemned it. The phrase used as alleged evidence of minimising exhibitionism is taken out of context."
In his letter published, the Emeritus Pope stated that the oversight was used to cast doubt on his truthfulness, "and even to label me a liar".
"At the same time, I have been greatly moved by the varied expressions of trust, the heartfelt testimonies and the moving letters of encouragement sent to me by so many persons."
He expressed gratitude for the confidence, support and prayer that Pope Francis personally expressed to him.