Brazil achieved independence in 1822. Until the 20th century, it was a large rural nation with low social and economic standards comparing to the average North American and European standards. Its economy was based on the primary sector, possessing an unskilled and increasingly larger workforce, composed of free people (including slave owners) and slaves or their direct descendants. Among the first law schools founded in Brazil were the ones in Recife and São Paulo in 1827. But for decades to come, most Brazilian lawyers studied at European universities, such as in the ancient University of Coimbra, in Portugal, which had awarded degrees to generations of Brazilian students since the 16th century.