Portuguese nationality law details the conditions by which a person is a national of Portugal. The primary law governing nationality regulations is the Nationality Act, which came into force on 3 October 1981. Portugal is a member state of the European Union (EU) and all Portuguese nationals are EU citizens. They have automatic and permanent permission to live and work in any EU or European Economic Area (EEA) country and may vote in elections to the European Parliament. All persons born in Portugal before 3 October 1981 were automatically citizens at birth regardless of the nationalities of their parents. Individuals born in the country since that date receive Portuguese citizenship at birth if at least one of their parents is a Portuguese citizen or has resided in the country for at least one year. Foreign nationals may become citizens by naturalisation after living in Portugal for more than five years and showing proficiency in the Portuguese language. Due to Portugal's historical status as a colonial empire, some individuals with a connection to a former colony may acquire citizenship. The first legal arrangements for Portuguese citizenship were created through the 1603 Ordination of King Philip II of Portugal (the Ordenações Filipinas). It regulated the acquisition of citizenship at birth through a mixed system of jus soli and jus sanguinis. Citizenship was acquired by children born in Portugal in wedlock to Portuguese fathers or out of wedlock to Portuguese mothers. Children born outside Portuguese territory did not receive citizenship unless their in-wedlock father or out-of-wedlock mother was in royal service abroad. Children born in Portugal to a non-Portuguese father in-wedlock or out-of-wedlock non-Portuguese mother only acquired citizenship if that parent had been living in Portugal for at least ten years and owned property there. The Portuguese Constitution of 1822 both expanded and contracted transmission of citizenship by eliminating the parental property ownership requirement for jus soli birth to a non-Portuguese parent but by also requiring that the child continue to live in Portugal and declare the option for Portuguese nationality upon adulthood.