 In March 1717, while James was visiting Modena, he became engaged to his cousin Benedetta d'Este, but her father Rinaldo III put an end to the engagement to preserve his relations with Hanover and Great Britain.On 3 September 1719, James married Maria Clementina Sobieska (1702–1735), granddaughter of King John III Sobieski of Poland.The wedding was held in the chapel of the Episcopal Palace in Montefiascone, near Viterbo.