In July 1567, Mary was forced to abdicate in favour of her 13-month-old son James VI. James was to be brought up a Protestant and the government was to be run by a series of regents, beginning with James Stewart, 1st Earl of Moray, until James began to assert his independence in 1581. Mary eventually escaped and attempted to regain the throne by force. After her defeat at the Battle of Langside in May 1568, by forces loyal to the King's Party, led by Moray, she took refuge in England, leaving her son in their hands. In Scotland the King's Party fought a civil war on behalf of the king against his mother's supporters, which ended, after English intervention, with the surrender of Edinburgh Castle in May 1573. In 1578 a Second Book of Discipline was adopted, which was much more clearly Presbyterian in outlook. It placed church supervision fully in the hands of groups of elected church leaders, in presbyteries, synods and the general assembly.