She started her 40-year reign when her father, Emperor Charles VI, died in October 1740. Charles VI paved the way for her accession with the Pragmatic Sanction of 1713 and spent his entire reign securing it. Charles VI left behind a weakened and impoverished state, and upon his death, Saxony, Prussia, Bavaria, and France all repudiated the sanction they had recognised during his lifetime. Frederick II of Prussia (who became Maria Theresa’s greatest rival for most of her reign) promptly invaded and took the affluent Habsburg province of Silesia in the seven-year conflict known as the War of the Austrian Succession. In defiance of the grave situation, she managed to secure the vital support of the Hungarians for the war effort. Over the course of the war, despite the loss of Silesia and a few minor territories in Italy, Maria Theresa successfully defended her rule over most of the Habsburg Empire.
She has, as you well know, a terrible hatred for France, with which nation it is most difficult for her to keep on good terms, but she controls this passion except when she thinks to her advantage to display it. She detests Your Majesty, but acknowledges your ability. She cannot forget the loss of Silesia, nor her grief over the soldiers she lost in wars with you.
-Prussian ambassador’s letter to Frederick the Great.
The Treaty of Breslau of June 1742 ended hostilities between Austria and Prussia. With the First Silesian War at an end, the Queen soon made the recovery of Bohemia her priority. French troops fled Bohemia in the winter of the same year. On 12 May 1743, Maria Theresa had herself crowned Queen of Bohemia in St. Vitus Cathedral.
Prussia became anxious at Austrian advances on the Rhine frontier, and Frederick again invaded Bohemia, beginning a Second Silesian War; Prussian troops sacked Prague in August 1744. The French plans fell apart when Charles Albert (prince-elector of Bavaria) died in January 1745. The French overran the Austrian Netherlands in May.
Francis Stephen was elected Holy Roman Emperor on 13 September 1745. Prussia recognised Francis as emperor, and Maria Theresa once again recognised the loss of Silesia by the Treaty of Dresden in December 1745, ending the Second Silesian War. The wider war dragged on for another three years, with fighting in northern Italy and the Austrian Netherlands; however, the core Habsburg domains of Austria, Hungary and Bohemia remained in Maria Theresa’s possession. The Treaty of Aachen, which concluded the eight-year conflict, recognised Prussia’s possession of Silesia, and Maria Theresa ceded the Duchy of Parma to Philip of Spain. France had successfully conquered the Austrian Netherlands, but Louis XV, wishing to prevent potential future wars with Austria, returned them to Maria Theresa.