 Matthias was elected Holy Roman Emperor only months after Rudolph II died on 20 June 1612.Since Matthias and his two surviving brothers, Maximilian III and Albert VII were childless, his succession in Austria, Bohemia, Hungary and the Holy Roman Empire was uncertain.Matthias made Ferdinand the governor of Lower and Upper Austria and appointed him as his representative in Hungary, but Klesl became his most influential advisor.