From the Wikipedia page 
Margaret Tudor (28 November 1489 – 18 October 1541) was Queen of Scots from 1503 until 1513 by marriage to James IV of Scotland and then, after her husband died fighting the English, she became regent for their son James V of Scotland. She was born at Westminster Palace as the oldest daughter of Henry VII of England and Elizabeth of York, and granddaughter of Margaret Beaufort, Edward IV of England and Queen Elizabeth Woodville. Margaret Tudor had several pregnancies, but most of her children died young or were stillborn. As queen dowager she married Archibald Douglas, 6th Earl of Angus. Through her first and second marriages, respectively, Margaret was the grandmother of both Mary, Queen of Scots, and Mary's second husband, Lord Darnley. Margaret's marriage to James IV foreshadowed the Union of the Crowns – their great-grandson, James VI and I, was the first to be monarch of both Scotland and England.