TITLE II
CHAPTER I
INTERNATIONAL LETTERS ROGATORY FROM ABROAD
Art. 25
(Appearance of a detained person)
1. Any detained person whose personal appearance as a witness or for purposes of confrontation is applied for by the requesting State shall be temporarily transferred to the territory of the State where the hearing is intended to take place, provided that he shall be sent back as soon as possible and subject to the provisions relating to the immunity envisaged by Articles 22 and 24 of this Law in so far as these are applicable.
2. Transfer shall be postponed if the presence of the detained person is necessary in criminal proceedings pending in the territory of the Republic of San Marino.
3. In the case provided for in the preceding paragraph and in accordance with the requirements envisaged for the execution of letters rogatory, transit of the detained person through the territory of a third State shall be granted on application, accompanied by all necessary documents and addressed by the Ministry of Justice of the requesting State to the Ministry of Justice of the State through whose territory transit is requested.
4. The transferred person shall remain in custody in the territory of the requesting State and, where applicable, in the territory of the State through which transit is requested.
5. The period of detention served by the detained person who is transferred abroad to take part in the hearing requested shall be computed as a period served for the purposes of the domestic conviction.
Facilitating voluntary appearance of persons - national procedures for ICC proceedings
EDIT.