The county of Nassau-Diez, like other Nassau territories, was occupied by Napoleonic France in 1795 and in 1806 was annexed by the Duchy of Nassau (ruled by the branch of Nassau-Weilburg) on 16–17 September 1796 as a consequence of the 2nd Coalition war between Austrians and French in the area between Diez and Limburg. By the end of the 18th century the entire west bank of the Rhine went to France and in 1803 a new Principality of Orange was formed from other territories, however only to be divided between the Duchy of Nassau and the Grand Duchy of Berg in 1806. William I of the Netherlands recovered his former counties in 1813, but gave Nassau-Diez, Nassau-Hadamar und Nassau-Dillenburg to Prussia, in exchange with Luxembourg, two years later. Prussia kept only Nassau-Siegen and soon ceded the other counties to the Duchy of Nassau which was however annexed by Prussia, including Diez, after the Austro-Prussian War in 1866, for Nassau's support of Austria.