(1) Authorities and other public agencies may not use passports for the automated retrieval of personal data. In derogation from the first sentence, federal and Land police authorities and offices, tax investigation agencies of the Länder and the authorities of the customs administration may use passports within the limits of their duties and powers for the automated retrieval of personal data recorded in police databases for the purposes of
1. border control,
2. alerts or to establish a person’s whereabouts for reasons of criminal prosecution, enforcement of a criminal sentence or to prevent threats to public security, or
3. customs control in the framework of police surveillance operations.
No subject-related record of database searches that have not yielded any results may be kept, except as provided in paragraph (2).
(2) Unless the law provides otherwise, personal data may not be stored in databases when the passport is read automatically; this also applies to searches of police databases that have yielded results.