Ratzinger was born in Marktl am Inn, in Bavaria, the second son and youngest child of Joseph Ratzinger, Sr. and his wife, Maria Riger, who was employed as a barmaid. His father was a police officer who served in both the Bavarian State Police (Landespolizei) and the national Order Police (Ordnungspolizei), retiring in 1937 to the town of Traunstein. The Sunday Times of London described the elder Ratzinger as "an anti-Nazi whose attempts to rein in Hitler's brownshirts forced the family to move several times" but other news outlets, including The New York Times said there is no evidence of that claim. The Pope has two elder siblings: Georg Ratzinger, who became a priest as well as a musician, and Maria Ratzinger.
According to his cousin Erika Kopp, who lives in Melbourne, Australia, Ratzinger had no desire from childhood to be anything other than a priest. When he was six, she says, he announced that he was going to be a bishop. When Ratzinger turned 14 in 1941, he joined the Hitler Youth, membership in which was legally required after 1938. National Catholic Reporter correspondent and biographer John Allen writes that Ratzinger was an unenthusiastic member who refused to attend meetings. Ratzinger has mentioned that a Nazi mathematics professor arranged reduced tuition payments for him at seminary. While this normally required documentation of attendance at Hitler Youth activities, according to Ratzinger, his professor arranged that the young seminary student did not need to attend those gatherings to receive a scholarship.
In 1943, when he was 16, Ratzinger was drafted with many of his classmates into the flak (anti-aircraft corps). Next they were sent to Unterföhring, northwest of Munich, and briefly to Innsbruck. From Innsbruck their unit went to Gilching to protect the jet fighter base and to attack Allied bombers as they massed to begin their runs towards Munich. At Gilching, Ratzinger served in telephone communications.
On September 10, 1944, his class was released from the Corps. Returning home, Ratzinger had already received a new draft notice for the Reichsarbeitdienst. He was posted to the Hungarian border area of Austria which had been annexed by Germany in the Anschluss of 1938. Here he was trained in the "cult of the spade" and upon the surrender of Hungary to Russia was put to work setting up anti-tank defences in preparation for the expected Red Army offensive.
Ratzinger again returned home. After three weeks passed, he was drafted into the army at Munich and assigned to the infantry barracks in the center of Traunstein, the city near which his family lived. After basic infantry training, his unit was sent to various posts around the city. They were never sent to the front.
In late April or early May, days or weeks before the German surrender, Ratzinger deserted after two years of service in the German army. He left the city of Traunstein and returned to his village on the outskirts. Desertion was widespread during the last weeks of the war, even though in principle punishable by death; executions, frequently extrajudicial, continued to the end. In the days preceding imminent German defeat, however, many deserted for fear of the more salient Allied threat. Diminished morale, and the greatly diminished risk of execution from a preoccupied German military, also contributed notably to pervasive desertion. He was briefly interned in an open air prisoner of war camp near Ulm and was released on June 19, 1945. Most information about Ratzinger's wartime activities is based on his own memoirs and accounts from his brother, Georg.