Between 1639 and 1649, the Barberini fought the Wars of Castro alongside the Pamphili family. Maffeo's father, Taddeo, and Luigi Mattei led the papal armies loyal to Pope Urban VIII and the Barberini family. In 1644, after the first "War of Castro", Pope Urban VIII died and Pamphili family Pope Innocent X was elected in his place. Pope Innocent subsequently began an investigation into Antonio Barberini (Maffeo's uncle), prompting him to flee into exile with his two brothers, Francesco and Taddeo (Maffeo's father).