Despite the crushing defeat at Poltava in 1709, Charles XII of Sweden refused to negotiate for peace. Indeed, Sweden was able to land an army in Germany in 1712 and win a victory at Gadebusch.
Most of the fighting of the war had to this point taken place outside of the Sweden's core territory. The anti-Swedish coalition decided to force Sweden to come to terms by invading Sweden from two directions, Denmark from the south and Russia from the eastern Finnish half. However, the Danish army was defeated at the battle of Helsingborg and the original plan was abandoned. The Swedish army in Finland consisted almost entirely of Finnish soldiers, and was led by General Georg Henrik Lybecker. He was neither a popular nor a successful commander. His previous attempted diversionary campaign against Saint Petersburg in 1708 had resulted in the Finnish army being severely mauled. In particular, he had been forced to abandon his cavalry while retreating, which would have dire consequences in the near future. Towards in April 1713, Russian troops with General Apraksin in the lead and czarPeter I in the vanguard headed for Finland. An amphibious strategy employed by Apraksin allowed him to tie down the defending Finnish army with part of his force, while a second part would perform an outflanking maneuver by making a coastal landing behind the Finns. Helsinki and Porvoo fell early in May, and by August the Russians had advanced to Turku, with General Lybecker constantly falling back. His failure to defend Finland led to his replacement in September by General Armfeldt. Armfeldt took a strong position on an isthmus between the lakes Pälkänevesi and Mallasvesi in parish of Pälkäne to defend the next important town, Tampere. He arranged his infantry behind a river Kostianvirta connecting the two lakes across the isthmus, hence the alternative name of battle of Kostianvirta. Apraksin and the Russian army based itself in nearby Kantokylä. The strong Finnish position would be difficult to force with a frontal attack, so Apraksin applied the formula that had been so successfully used previously in the Finnish campaign.
The battle
Apraksin planned to divert the Finns with a frontal assault while Mikhail Galitzine led an amphibious landing behind the Swedish position by crossing lake Mallasvesi in the early morning of 6 October. When dawn broke the Russians were spotted by the Finns, who prepared for battle. The first wave of Galitzine's troops made a beach landing to the west of Apraksin's main front. The Finnish cavalry was still in quarters around the village of Mälkilä, but Armfeldt was able to get the cavalry moving. His intent was to pin and disorder the Russians with dismounted cavalry units and then strike with a mounted cavalry flank attack. However, because of the delay the Russians were able to organize themselves on the beachhead and the weak Finnish cavalry was unable to carry out its mission. In the east, Apraksin attempted to cross the channel using improvised rafts in three groups, with artillery support. However, the defending Finnish infantry were able to fend off the assaults. Apraksin kept pressing, mounting several attacks, including one where the Russian cavalry attempted to wade through the lakes to flank the Finnish infantry, with no success. While the stalemate continued in the east, the Russian western beachhead was reinforced with additional infantry. Armfeldt counterattacked with his infantry reserves, and was initially successful but with the underperforming Finnish cavalry and the increasing numerical superiority of the Russians Armfelt was repulsed; the cavalry was routed. As the west part of the Finnish army withdrew in disorder, the eastern position became vulnerable to Galitzine's victorious troops. The Finnish infantry in the east were reluctant to leave as they had fought successfully during the day, but Armfeldt realized his position was untenable and started withdrawing. Harassed by Russian cavalry, the Finnish army abandoned their positions and the majority of their artillery.
Aftermath
The Finnish army had suffered a defeat, and the performance of its cavalry had certainly been a disappointment. However, it did survive the engagement and withdrew to reorganize. Armfeldt and Galitzine would meet again in Isokyrö in February the next year.