 Prota Mateja became the deputy-commander of the insurgents of the Valjevo district (1804), but did not hold the post for long, as Karađorđe sent him in 1805 on a secret mission to St. Petersburg, and afterwards employed him almost constantly as Serbia's diplomatic envoy to Russia, Austria, Bucharest and Constantinople.After the fall of Karadjordje (1813), the new leader of the Serbs, Miloš Obrenović, sent Prota Mateja as representative of Serbia to the Congress of Vienna (1814–1815), where he pleaded the Serbian cause indefatigably.During that mission he often saw Lord Castlereagh, and for the first time the Serbian national interests were brought to the knowledge of British statesmen.