In July, Congress appointed General Horatio Gates commander in the south; he was defeated at the Battle of Camden on August 16, leaving Cornwallis free to enter North Carolina. Despite battlefield success, the British could not control the countryside and Patriot attacks continued; before moving north, Cornwallis sent Loyalist militia under Major Patrick Ferguson to cover his left flank, leaving their forces too far apart to provide mutual support. In early October, Ferguson was defeated at the Battle of Kings Mountain, dispersing organized Loyalist resistance in the region. Despite this, Cornwallis continued into North Carolina hoping for Loyalist support, while Washington replaced Gates with General Nathanael Greene in December 1780.