▁to ▁have ▁a ▁cod ified ▁legal ▁system , ▁as ▁of ▁ 1 8 4 4 . ▁The ▁last ▁Ott oman ▁troops ▁with d rew ▁from ▁Ser bia ▁in ▁ 1 8 6 7 , ▁although ▁Ser bia ' s ▁independence ▁was ▁not ▁recognized ▁intern ation ally ▁until ▁the ▁Congress ▁of ▁Berlin ▁in ▁ 1 8 7 8 . ▁▁ ▁Ser bia ▁fought ▁in ▁the ▁B alk an ▁Wars ▁of ▁ 1 9 1 2 – 1 3 , ▁which ▁forced ▁the ▁Ott om ans ▁out ▁of ▁the ▁B alk ans ▁and ▁double d ▁the ▁territory ▁and ▁population ▁of ▁the ▁Kingdom ▁of ▁Ser bia . ▁In ▁ 1 9 1 4 , ▁a ▁young ▁Bos n ian ▁Ser b ▁student ▁named ▁G av ril o ▁Princi p ▁assass in ated ▁Arch du ke ▁Franz ▁Ferdinand ▁of ▁Austria , ▁which ▁directly ▁contributed ▁to ▁the ▁out break ▁of ▁World ▁War ▁I . ▁In ▁the ▁fighting ▁that ▁en su ed , ▁Ser bia ▁was ▁inv aded ▁by ▁Austria - H ung ary . ▁Despite ▁being ▁out number ed , ▁the ▁Ser bs ▁defeated ▁the ▁Aust ro - H ung ari ans ▁at ▁the ▁Battle ▁of ▁Cer , ▁which ▁marked ▁the ▁first ▁Al lied ▁victory ▁over ▁the ▁Central ▁Pow ers ▁in ▁the ▁war . ▁Further ▁vict ories ▁at ▁the ▁batt les ▁of ▁Kol ub ara ▁and ▁the ▁Dr ina ▁meant ▁that ▁Ser bia ▁remained ▁un con quer ed ▁as ▁the ▁war ▁entered ▁its ▁second ▁year . ▁However , ▁an ▁invasion ▁by ▁the ▁forces ▁of ▁Germany , ▁Austria -