Julian Nagelsmann has been given nine months to revive flailing Germany ahead of hosting Euro 2024 after being named as the sacked Hansi Flick's successor as national team coach on Friday.
Germany fired Flick with the national team struggling, the German football association (DFB) fearing another embarrassing performance in a major tournament, this time as hosts at next year's European championships.
Former Bayern Munich boss Nagelsmann has signed a deal until the end of next July, allowing the 36-year-old to leave after Euro 2024.
"We have a European Championship in our own country -- that's something special," Nagelsmann said in a statement.
"I have a great desire to take on this challenge."
Nagelsmann said he signed the short-term deal "to keep the Euros in focus" but insisted he "would not rule out" an extension.
Flick, who became the first coach in Germany history to be sacked, had won just four of 17 matches leading up to his dismissal and took the team to a disappointing group-stage exit at the 2022 World Cup in Qatar.
The four-time world champions were also knocked out in the group stage at the 2018 World Cup in Russia under previous boss Joachim Loew.
DFB president Bernd Neuendorf called Nagelsmann "an outstanding coach".
"We are convinced (he) will ensure that the national team inspires its fans and that the Euros are also a sporting success," said Neuendorf.
Flick was sacked after a humiliating 4-1 friendly loss to Japan in Wolfsburg in early September.
Nagelsmann, who also succeeded Flick as Bayern coach, has been jobless since he was sacked by the German champions in March.
DFB sporting director Rudi Voeller called Nagelsmann "an absolute football expert" and said he had "proven himself at a very young age for a head coach".
Voeller took the reins on a "one-off" basis for Germany's 2-1 win over France in Dortmund, but said his main task was to find a permanent successor.
Nagelsmann said the victory over France was "the beginning" of the team's journey to Euro 2024.
Benjamin Glueck and Sandro Wagner have been appointed as Nagelsmann's assistants.
Current Bayern manager Thomas Tuchel, who replaced Nagelsmann in the job, congratulated the new Germany boss.
"It goes without saying that Julian is a top coach" Tuchel said, predicting Germany will have "a good home Euros" under the manager.
Nagelsmann was seen as a rising star after impressive spells at Hoffenheim and RB Leipzig, before getting the top job at Bayern.
Nagelsmann was mentioned as a possible candidate for a number of top club vacancies over the summer, being linked with English sides Chelsea and Tottenham Hotspur, as well as Paris Saint-Germain.
Nagelsmann told a press conference he would focus on a playing style which was "easy to implement", saying: "Especially in difficult moments, it's important to give players something they can grasp."
Nagelsmann spoke out for the first time about his "painful" Bayern exit.
"What hurts most in a separation like that is that it is painful to sit in front of the TV and watch your team in the Champions League, but know that you aren't able to help them and work with them," he said.
The Bavaria native, who became the youngest coach in Bundesliga history when he took over as head coach of Hoffenheim aged 28, added: "For me as a person, Julian Nagelsmann, I don't define myself by the job.
"There can be phases where it doesn't go perfectly. That's part of the job. But I know when I lie down in bed in the evening, there's other things that define me, not just the job as a football coach."
Nagelsmann said he was "looking forward" to meeting his former Bayern players in the national team setup again.
"I really enjoyed working with those players."
Nagelsmann also confirmed Barcelona midfielder Ilkay Gundogan, who Flick named as captain to replace the injured Manuel Neuer, would keep the top job.
"I'm extremely convinced of Ilkay as a person and as a player."
Germany's next assignment is a tour to the United States in October, playing friendlies against the USA and Mexico.