From 1864 as a result of the Second War of Schleswig it was part of Prussia, and as such part of the North German Confederation, and from 1871 onwards, part of the German Empire. In the 1920 Schleswig Plebiscite that brought Northern Schleswig to Denmark, 55.1% of Aabenraa's inhabitants voted for remaining part of Germany and 44.9% voted for the cession to Denmark. However, since a plurality of votes in the surrounding Aabenraa municipality voted to join Denmark, the town was thus ceded to the Danish crown.