The Battle of Gemauerthof was a battle in the Great Northern War, fought south of Riga, in present day Latvia in July of 1705. The Swedish forces under Adam Ludwig Lewenhaupt fought a Russian army under Boris Sheremetyev. The Swedes, exhausted after forced marching, went to camp and were cooking supper when the news came of a large Russian army with 16 artillery pieces nearby. The Swedes, who themselves had 17 artillery pieces quickly deployed into battle formation and, encouraged by General Lewenhaupt, attacked the Russians. Although suffering severe setbacks on their right flank, the assault continued. On the left, the Swedish cavalry charged and broke the Russians. The infantry in the centre fired carefully at point-blank range and then charged, pushing their foes back in disorder. The battle ended in a confused melee, which was eventually won by the Swedes. The Russian cavalry withdrew while the infantry was destroyed by a combined-arms assault leaving 5,000 men dead, wounded or captured. The Swedes were victorious, but the victory was only symbolic. In August, the Russians conquered Courland.