Between 1803 and 1806, the vast majority of the states of the Holy Roman Empire were mediatized by Napoleon. These states lost their Reichsunmittelbarkeit ("imperial immediacy") and became part of other states. The number of states was reduced from about three hundred to about thirty. Mediatization went along with secularization: the abolition of most of the ecclesiastic states. The legal basis for mediatization was the Reichsdeputationshauptschluss of 1803, which had become necessary under pressure from France. The Treaty of the Confederation of the Rhine of 1806 continued the process of mediatization. The constitution of the German Confederation of 1815 confirmed the mediatization, but gave certain rights to the mediatized princes, such as first instance jurisdiction.
The dissolution of the Holy Roman Empire meant that anyone who was previously a directly subject to the authority of the Emperor ceased to be subject to any superior authority. In practice, however, not everyone survived as sovereign into the new legal order that emerged in 1806. Of those who were immediate in the Empire, some became sovereign; the others became subjects of someone else: they were mediatized. Most mediatizations took place in July 1806 as a consequence of the formation of the Confederation of the Rhine. Within the area covered by the Confederation, those who became full-fledged members of the Confederation became full-fledged members of the international community as sovereign entities. A few other mediatizations were carried out by Napoleon between 1806 and 1813, and were not reversed by the Congress of Vienna. The exact process of mediatization was delineated by articles 25-33 of the treaty founding the Confederation. Although the mediatized families did not acquire sovereignty and lost some of their powers (legislation, final jurisdiction, control over police and military conscription, right to levy taxes), they kept their private estates and feudal rights, including lower jurisdiction in civil and criminal cases, jurisdiction over local policing, forests, hunting and fishing rights, mining rights, etc. Mediatized princes continued to be subject to a special jurisdiction in criminal matters, their estates were free from confiscation, and some of their liabilities were taken over by their new sovereigns. They were free to settle anywhere within the territory of the Confederation.