Albany arrived in Scotland in May 1515, and was finally installed as regent in July. His first task was to get custody of James and Alexander, politically essential for the authority of the regency. Margaret, after some initial defiance, surrendered at Stirling in August. With the princes in the hands of their uncle, Margaret, now expecting a child by Angus, retired to Edinburgh. For some time her brother had been urging her to flee to England with her sons; but she had steadily refused to do so, fearing such a step might lead to James's loss of the Scottish crown.