Stojanović started playing football at the local football club Arne Tabor, before joining Slovan and later Interblock youth selections, where he remained until 2011, when he was acquired by Maribor.[3][4] After his transfer to Maribor, Joc Pečečnik, the owner of Interblock, accused Zlatko Zahovič, the director of football at Maribor, of going behind his back and stealing one of the biggest Slovenian talents of his age.[3]
Initially, Stojanović played as a goalkeeper but he then switched to the position of an offensive midfielder.[3] When he transferred to Maribor youth selections he was regarded as one of the most promising young midfielders in the country,[3] however, Maribor's coaches and staff saw a much bigger potential for Stojanović on the position of right-back.[4] During his first year in Maribor he mostly played for the under-17 team.[5] However, he got his chance to play for the main squad in the second part of the 2011–12 season and made his first appearance in the Slovenian top division, 1. SNL, on 25 March 2012.[6] At the time of his debut, he was 16 years, five months and 18 days old and set a new club record as the youngest player to appear in the top division.[6]
On 5 January 2016, he signed a five-year contract with Dinamo Zagreb, reportedly for a transfer fee of around €2 million plus add-ons.[7][8]
On 20 July 2021, Stojanović joined Italian club Empoli on loan with a conditional obligation to buy.[9] The conditions were fulfilled and Empoli purchased the rights on 17 June 2022.[10]
International career
Stojanović represented Slovenia at all youth international levels from under-16 to under-21.[11]
As a member of the Slovenia under-17 team, Stojanović appeared at the 2012 UEFA European Under-17 Championship, where he scored one goal.[12] He debuted for the senior squad against Colombia on 18 November 2014.[13] At the time, he was 19 years, one month and 11 days old and became the youngest debutant in the national team, surpassing the previous record set by Rene Mihelič seven years earlier.[13][14]
^"Petar Stojanović v Zagrebški Dinamo" [Petar Stojanovic to Dinamo Zagreb] (in Slovenian). NK Maribor. 5 January 2016. Archived from the original on 1 February 2016. Retrieved 6 January 2016.