Burgoyne's army had been reduced to about 6,000 men by the loss at Bennington and the need to garrison Ticonderoga, and he was running short on supplies. Despite these setbacks, he determined to push on towards Albany. An American army of 8,000 men, commanded by the General Horatio Gates, had entrenched about 10 miles (16 km) south of Saratoga, New York. Burgoyne tried to outflank the Americans but was checked at the first battle of Saratoga in September. Burgoyne's situation was desperate, but he now hoped that help from Howe's army in New York City might be on the way. It was not: Howe had instead sailed away on his expedition to capture Philadelphia. American militiamen flocked to Gates' army, swelling his force to 11,000 by the beginning of October. After being badly beaten at the second battle of Saratoga, Burgoyne surrendered on October 17.