David was threatened by three groups of enemies: his overambitious nobles, Edward Baliol and his English allies.
The first of these groups to strike was David Baliol, son of John Baliol and a staunch ally of the English. In 1333 Edward Baliol sent an army northwards to attack Scotland. The ensuing war raged on for nearly 10 years. When David II finally returned to Scotland, Scotland was in a state of near-bankruptcy. David then led an ill fated invasion of England in 1346, during which he was captured after the Battle of Neville's Cross (near Durham) and held prisoner by the English for the next 11 years. The English finally agreed to releas David on one condition, that Scotland pay a huge ransom. The nobles agreed to this, but due to the nation's state of near-bankruptcy, barely any of the ransom was ultimately paid.
David then went on to found a Scottish parliament that met on a regular basis. This was very popular with townspeople in Scotland, as it gave them a chance to play a part in discussing government policy .