When the male line of the Hapsburgs actually died off in 1740, Maria Theresa (1740–1780), the daughter of Charles VI, came to the throne. She took the Tuscan duke Francis of Lorraine as her husband. In the same year, the recognition of the Pragmatic Sanction proved to be worthless when the Prussian king Frederick II invaded Silesia, the richest land of the monarchy. The Elector of Bavaria Karl Albrecht, the king of Saxony-Poland, and the Prussian king entered into an anti-Hapsburg alliance. They were supported by Spain and France. The Bohemian estates elected the Bavarian Karl Albrecht as King of Bohemia. He was also given the title of emperor. Only the Hungarians and the ally Great Britain remained loyal to Maria Theresa.
The wars were ended by the peace concluded at Dresden and Aix-la-Chapelle (Aachen). Prussia gained most of Silesia and Glatz. The demands of its other allies were not met. Maria Theresa remained Queen of Bohemia and her husband Francis of Lorraine became Holy Roman Emperor.
In 1756, Prussian forces once again invaded Bohemia. In contrast with the previous war, a radical change occurred in the make-up of the coalitions. The Bohemian noble Wenzel Anton Kaunitz, the state chancellor, negotiated an alliance with France and Russia. An isolated Prussia sought assistance from Great Britain. Frederick II was saved from an absolute catastrophe by the accession of the Russian tsar Peter III, who was a great admirer of the Prussian king and his country. Maria Theresa also failed to win back Silesia in this war.
In reaction to the lost wars, Maria Theresa and her son Joseph II (1780–1790) strived to raise the standard of the monarchy. Enlightenment reforms were intended to make the state administration more efficient, to improve the collection of taxes, and to support the development of the economy. Centralisation was one of the instruments of the Enlightenment reforms. First the Czech lands were united with the monarchy exclusively through the figure of the monarch. After the Battle of White Mountain, a separate Bohemian kingdom and a self-contained Moravian margraviate had always existed, but this now involved a dynastic union. In 1749 one common body for the Czech and Austrian lands was established. The reform of the state administration went hand in hand with tax reform. In 1781, Joseph II issued a patent on the abolition of serfdom, because serfdom and corvée activity inhibited economic development. Serfs could now change residence without the consent of the nobility, they could send their children off to study, and could marry who they wished. In the same year, he issued a tolerance patent allowing one to profess another Christian faith besides Catholicism. Nevertheless, this only concerned tolerance, not equality between denominations. Compulsory school attendance was introduced, and the first learned societies were established. With fiscal and urbarial patents, Joseph II introduced other reforms improving the position of country people.
After his death Leopold II (1790–1792) had to repeal these under pressure from the nobility. In the popular classes, Joseph II cultivated the image of being a “peasant” emperor who worked in favour of the people.