The immigration office (Ausländerbehörde, Landesamt für Einwanderung, LEA or Ausländeramt) is where foreigners apply for a German residence permit.
In Berlin, the official name is Landesamt für Einwanderung, but most people still call it the Ausländerbehörde.