German citizenship is primarily based on the principle of jus sanguinis. In other words one usually acquires German citizenship if a parent is a German citizen, irrespective of place of birth.
A significant reform to the nationality law was passed by the Reichstag (the German parliament) in 1999, and came into force on 1 January 2000. The new law makes it somewhat easier for foreigners resident in Germany on a long-term basis, and especially their German-born children, to acquire German citizenship.
The previous German nationality law dated from 1913.
Prussian law was the basis of the legal system of the German Empire. Prussia's nationality law can be traced back to the "Law Respecting the Acquisition and Loss of the Quality as a Prussian subject, and his Admission to Foreign Citizenship" of 31 December 1842, which introduced Jus sanguinis to the country. Until 1913, however, each German state had its own nationality laws, those of the southern ones (notably Bavaria) being quite liberal. In 1913, the Nationality Law of the German Empire and States (RuStAG) of 22 July 1913 standardized the law in all of the German Empire. It had been operational until the 1999 reforms.
Under the terms of the incorporation of Austria into Germany after World War I, German nationality law was extended to Austria in 1921 under the Anschluss which annexed Austria to Germany after the collapse of Austria-Hungary after the end of the first World War.
German citizenship was again extended after the population transfers of around 2.6 million ethnic Germans following the end of the second World War