The Infanta Bárbara (pron.IPA: ['baɾbɐɾɐ]; Maria Madalena Josefa Teresa Bárbara of Braganza; English: Mary Magdalene Josepha Theresa Barbara) (December 4, 1711 – August 27, 1758), was a Portugueseinfanta and later Queen Consort of Spain. She was the eldest daughter of King John V of Portugal and his wife, Maria Anna, Archduchess of Austria, a daughter of Emperor Leopold I. Her parents were married in 1708, but for nearly three years the queen did not give birth to any children. The King then made a promise to God that if an heir to the throne was born, a great convent would be built to thank Him. On December 41711, an Infanta was born, and the Convent of Mafra was built. She was born as heiress-presumptive to the Portuguese throne, but her status as heir lapsed when the Queen gave birth to a son, Pedro, two years later. Pedro died at the age of two, but another son, Joseph, had been born before Peter's death. Though Barbara was never heiress-presumptive again, she was second-in-line to the throne throughout much of her life. The Princess was baptized Maria Madalena Bárbara Xavier Leonor Teresa Antónia Josefa (English: Mary MagdaleneBarbaraXavierEleanorTheresaAntoniaJosepha), her names honouring a number of saints and relatives. She was usually referred to as Bárbara or Maria Bárbara, a name never before used among Portuguese royals, in honour of St. Barbara, the saint of her birthday. She had a fine education and loved music. An accomplished keyboard player, she was a student of Domenico Scarlatti, the famous harpsichordist and composer, from age 9 or 10 until age 14. In 1729 at age 18, she married the future Ferdinand VI of Spain, two years her junior. Her brother Joseph married Ferdinand's half-sister, the Spanish Infanta Marianne Victoria of Borbón. Scarlatti followed her to Madrid on her marriage and remained with her, composing hundreds of harpsichordsonatas for her. Although Barbara was not beautiful — her homely looks were thought by observers to cause the prince a visible shock when he was first presented to her — 'Ferdinand the Learned' (as he was called) became deeply attached to her, sharing her passion for music. Her death was said to have broken his heart. They had no children. Barbara, who suffered from severe asthma for most of her life, died in Aranjuez, Spain, in 1758.