 Monsignor Pietro Gasparri , the recently appointed undersecretary at the Department of Extraordinary Affairs , had underscored his proposal to Pacelli to work in the ' Vatican 's equivalent of the Foreign office ' by highlighting the ' necessity of defending the Church from the onslaughts of secularism and liberalism throughout Europe . ' Pacelli became an apprendista , an apprentice , in Gasparri 's department . In January 1901 he was also chosen , by Pope Leo XIII himself , according to an official account , to deliver condolences on behalf of the Vatican to King Edward VII of the UK after the death of Queen Victoria . 
