The first part of the book recounts the attempts of the hero, David Balfour, to gain justice for James Stewart (James of the Glens), who has been arrested and charged with complicity in the Appin Murder. David makes a statement to a lawyer and goes on to meet William Grant of Prestongrange, the Lord Advocate of Scotland, to press the case for James' innocence. However, his attempts fail as - after being reunited with Alan Breck - he is once again kidnapped and, this time, confined on the Bass Rock, an island in the Firth of Forth, until the trial is over, and James condemned to death. David also meets and falls in love with Catriona MacGregor Drummond, the daughter of James MacGregor Drummond, known as James More (who was Rob Roy's eldest son), also held in prison, whose escape she engineers. David also receives some education in the manners and morals of polite society from Barbara Grant, Prestongrange's daughter.