(CNN) -

Before he was Pope Benedict XVI, before he earned the nickname "Cardinal No" as the enforcer of church doctrine, he was Joseph Ratzinger -- the son of Maria and police officer Joseph Ratzinger, learning about life and God in Germany between two world wars.

According to Roman Catholic doctrine, Benedict is not only the church's leader but God's representative on earth and infallible.

He is also a man -- one who savors his meat and potatoes, an accomplished pianist who loves Mozart, and a teacher who for years commanded university classes. His humanity became apparent Monday, when the Vatican announced he'd resign at month's end "because of advanced age," becoming the first pope in nearly 600 years to do so.

After his birth on April 16, 1927, in Marktl am Inn, in southeastern Germany near the Austrian border, Ratzinger's early years were defined by his country and the turbulent times, as well as his faith.

Adolf Hitler rose to power during Ratzinger's adolescent years in Traunstein, in the heavily Catholic region of Bavaria. When he was 14, school officials followed Nazi officials' orders and enrolled him and the rest of his class in the Hitler Youth movement -- against his will, Ratzinger wrote in his memoir.

He left the organization shortly thereafter, because he was studying for the priesthood. But in 1943, Ratzinger was brought back into the Nazi fold upon being drafted into the German army.

For the next two years, Ratzinger served his country as part of an anti-aircraft unit. But in the waning days of World War II, he deserted -- and was taken prisoner by the U.S. Army.

According to CNN Senior Vatican Analyst John Allen, Ratzinger's family was strongly, if quietly, anti-Nazi and his father took a series of less significant jobs to steer clear from what was happening under Hitler.

In June 1945, Ratzinger was released from a POW camp. Hitching a ride on a milk truck, he headed home.

And life began anew.

The soldier became a scholar, studying philosophy and theology at the University of Munich and another school in Freising between 1946 and 1951. Two years later, he earned a doctorate in theology, after submitting a thesis titled, "The People and House of God in St. Augustine's Doctrine of the Church."

Eventually, he became a professor -- teaching dogma and fundamental theology at four German universities. In 1969, for instance, he was appointed vice president and professor of theology at the University of Regensburg in Germany.

"Books are his best friends," Allen said.

All the while, he grew more ingrained in the Roman Catholic Church and its hierarchy.

In 1962, 11 years after his ordination as a priest, the then-35-year-old was a consultant during Vatican II to Cardinal Josef Frings, a reformer who was archbishop of Cologne, Germany.

As a young priest, Ratzinger was on the progressive side of theological debates. But he began to shift right after student revolutions of 1968, according to Allen, also a correspondent with the National Catholic Reporter.

In fact, it was Ratzinger's conservative defense of strict doctrines that defined him in many people's eyes -- until he became pope.

A defender of church doctrine and a 'simple, humble worker'

In the late 1970s and 1980s, Ratzinger shot up the church's ranks.

In spring 1977, he was named archbishop of Munich and Freising. A few months later, Pope Paul VI appointed him cardinal.