Caught in Budapest when Austria-Hungary declared war upon his country, Field Marshal Putnik was allowed safe passage back to Serbia in a chivalrous and possibly self-defeating gesture by the Austro-Hungarian emperor Franz Josef. After a troublesome trip, Putnik returned to Serbia and offered his resignation to King Peter I of Serbia on the grounds of age and ill health. It was rejected, the king insisting that Field Marshal Putnik take command over the army, if only in a strategic sense, while younger generals, such as Stepa Stepanović, Živojin Mišić and Petar Bojović would take over operational duties. Putnik had to spend most of his time in a well-heated room. However, his impaired health did not prevent him from successfully organizing the campaign. Serbia defeated the Austro-Hungarian Army's offensives in August and September 1914 (battles of Cer and Kolubara), driving it out of Serbia by December 1914.