(1) Subject to subsections (2) and (4), the Garda Commissioner may request a service provider to retain, for a period of 3 years, traffic data or location data or both for the purposes of -
(a) the prevention, detection, investigation or prosecution of crime (including but not limited to terrorist offences), or
(b) the safeguarding of the security of the State.
(2) The data retention request must be made in writing.
(3) Traffic data and location data that are in the possession of a service provider on the passing of this Act and that were retained by the service provider for the purposes specified in subsection (1) are deemed to have been the subject of a data retention request, but only if the 3 year retention period for the data has not elapsed before the passing of this Act.
(4) For the purposes of this Part, the 3 year retention period begins -
(a) in the case of traffic data or location data referred to in subsection (3), on the date before the passing of this Act on which th