German social law
Individuals able to work, having no income and no savings, capital or assets (like expensive car, real estate etc.) and having a residence right can apply for welfare benefits covering the basic needs as basic food, living space (a flat/apartment) and health insurance.
People without German citizenship can apply for the ALG II-benefits in two cases: if they come from a member country of the European Union and fulfil requirements like working for some time and losing work through no fault of one´s own. The second case are people with a permanent residence permission.
Coming from the EU means that one can apply especially if having worked for some amount of time and losing the income through no fault of one´s own. In such case, one can apply for benefits as long, as he or she is staying in Germany.
Family members can also apply for benefits just as the worker who lost his/her job.
The safest way to apply for benefits is after working one year or more uninterruptedly, without even short periods of unemployment. Working time of less than a year enables to benefits for 6 months. New labour contracts reopen this possibility for the next six months after losing the working place before the end of one year at new work.