Patarei served as a fortress for Nicholas I, then as an army barracks and finally as a prison. It was closed in 2005 and now allows visitors to roam its abandoned halls for 2 euros. Because it is situated outside of the touristy Old Town area, there are few visitors there.
As an American citizen and a Japanese citizen we were allowed up to 30 days in Russia so according to our visas we had to leave by July 5th before midnight. Based on our research, you don’t want to mess around with Russian immigration when it comes to exiting the country because you could easily be stuck in the country for an additional few weeks while getting the proper documents to change your exit date if you don’t leave by the original specified date. Since we didn’t want to be sent to the gulags, we planned our exit for July 2nd which would give us 3 days of buffer time, just in case. Fortunately, when we arrived at the Estonian border, Russian immigration didn’t give us any trouble and we breezed right through into our first European country.