In 1703, Victor Amadeus switched sides, joining the Grand Alliance as he had in the Nine Years War. Savoy fared particularly badly against the larger French forces resulting in a siege of Turin in 1706. Anne Marie's uncle, Louis XIV (along with Spanish forces from Anne Marie's second cousin Philip V of Spain), besieged Turin during the "Battle of Turin". French troops were under the control of Anne Marie's half brother, the Duke of Orléans. She and her sons were forced to flee Turin with the grandmother for the safety of Genoa. Turin was saved by the combined forces of Victor Amadeus and Prince Eugene of Savoy in September 1706.