Even after the declaration, there was still substantial support for James in Scotland. Viscount Dundee raised an army in the Scottish Highlands and won a convincing victory at Killiecrankie on 27 July. The huge losses suffered by Dundee's troops, however, coupled with his fatal wounding, served to remove the only effective resistance to William and the uprising was quickly crushed, suffering a resounding defeat the next month at the Battle of Dunkeld.