To be eligible for naturalization, a person has to have lived legally in Germany for at least eight years and possess the appropriate residence permit. Foreigners who have successfully completed an integration course are eligible for naturalization after seven years.