hiː dʒˈɔɪnd ðə spˈænɪʃ ˈɑːɹmi ænd æz mˈɛnɪəv hɪz kəntˈɛmpɚɹˌɛɹiz, hɪz mˈɪlətˌɛɹi kɚɹˈɪɹ bɪɡˈæn dˈʊɹɹɪŋ ðə spˈænɪʃ pənˈɪnsjʊlɚ wˈɔːɹ ɪn wˈʌn θˈaʊzənd ˈeɪthˈʌndɹɪd ˈeɪt æz ɐn ɑːɹtˈɪlɚɹi dʒˈɛnɚɹəl, æz wˈɛl æz ðə pɹəfˈɛsɚ fɔːɹ mˌæθɪmˈæɾɪks ɪnðə mˈɪlətˌɛɹi skˈuːl.
He joined the Spanish army and as many of his contemporaries, his military career began during the Spanish Peninsular War in 1808 as an artillery general, as well as the professor for mathematics in the military school.