A residence permit is a document that allows a foreign national to stay in the Republic of Latvia for a specified period of time. Two types of residence permit exist, a temporary residence permit and apermanent residence permit.
A residence permit is required if a foreign national or a stateless person wishes to reside in the Republic of Latvia for more than 90 days within a 6-month period.
More detailed information here