Mary , the only surviving legitimate child of King James V of Scotland , was 6 days old when her father died and she acceded to the throne .
Mary was the daughter of King James V of Scotland , who died just after she was born .