On July 12.1806 ; Sixteen German imperial states leave the Holy Roman Empire and form the Confederation of the Rhine.