The Battle of Narva dealt a severe setback to Peter the Great, but the shift of Charles XII's army to the Polish-Saxon threat soon afterward provided him with an opportunity to regroup and regain territory in the Baltic provinces. Russian victories at Erastfer and Nöteborg (Shlisselburg) provided access to Ingria in 1703, where Peter captured the Swedish fortress of Nyen, guarding the mouth of the River Neva. Thanks to General Adam Ludwig Lewenhaupt, whose outnumbered forces fended the Russians off in the battles of Gemäuerthof and Jakobstadt, Sweden was able to maintain control of most of its Baltic provinces. Before going to war, Peter had made preparations for a navy and a modern-style army, based primarily on infantry drilled in the use of firearms.