The title was first granted in 1660 by King Charles II (immediately following the Restoration of the Monarchy) to his infant eldest nephew Charles Stuart (1660–1661), the first son of the Duke of York (later King James II), though he was never formally created Duke of Cambridge as he died at the age of six months. The first officially recognised creation of the dukedom was in the Peerage of England in 1664, when King Charles II granted the title to his next eldest surviving nephew James Stuart, the infant second son of the Duke of York, who died early in 1667 at the age of three, when the title again became extinct. The title was then granted later that year by King Charles II to his next eldest surviving nephew Edgar Stuart, the third son of the Duke of York, who also died in infancy, in 1671 at the age of three, when the title became extinct the third time. The Duke of York's 4th son Charles (his eldest son by his second wife) was also styled Duke of Cambridge in 1677, but died when about a month old, not having lived long enough to be formally created duke.