Gates tapped Kościuszko to survey the country between the opposing armies, choose the most defensible position, and fortify it. Finding just such a spot near Saratoga, overlooking the Hudson at Bemis Heights, Kościuszko laid out a robust array of defences, nearly impregnable. His judgment and meticulous attention to detail frustrated the British attacks during the Battle of Saratoga, and Gates accepted the surrender of Burgoyne's force there on 16 October 1777. The dwindling British army had been dealt a sound defeat, turning the tide to American advantage. Kościuszko's work at Saratoga received great praise from Gates, who later told his friend Dr. Benjamin Rush: "The great tacticians of the campaign were hills and forests, which a young Polish engineer was skillful enough to select for my encampment."