§ 13 NDSG
Processing of personal data for scientific or historical research purposes
(1)1Public bodies may process personal data, including data within the meaning of Article 9(1) of the General Data Protection Regulation, for a specific scientific or historical research project or transmit them to other bodies for that purpose, where the nature and processing of the data suggest that a legitimate interest of the data subject does not oppose the processing of the data for the research project, or where the public interest in the conduct of the research project outweighs the legitimate interest of the data subject. 2The result of the balancing of interests and its reasons shall be recorded. 3The data protection officer pursuant to Article 37 of the General Data Protection Regulation shall be informed of the processing.
(2)1Where personal data are processed for scientific or historical research purposes, they shall be anonymised by the research institution as soon as the research purpose permits. 2Until then, the identifying features shall be stored separately. 3Those features may only be combined with the individual data insofar as the research purpose so requires.
(3)In the context of scientific or historical research projects, personal data may only be published where
(4)the data subject has given consent, or
(5)this is indispensable for the presentation of research results concerning events of contemporary history.
(6)1Personal data may only be transmitted to recipients to whom the provisions of this Part do not apply for scientific or historical research purposes where they have undertaken to process the data exclusively for the research project designated by them and in accordance with paragraphs 1 to 3 and to take protective measures pursuant to § 17 or equivalent measures. 2The transmission shall be notified to the authority headed by the Land Commissioner for Data Protection at an early stage.
(7)The controllers may refrain from granting the rights under Articles 15, 16, 18 and 21 of the General Data Protection Regulation insofar as and as long as the exercise of those rights would be likely to render impossible or seriously impair the achievement of the respective scientific or historical research purposes and the exclusion of those rights is necessary for the fulfilment of those purposes.