Question: What was the country immigration led to before it was a commonwealth?

full_context: Document 1: Puerto Rico: Originally populated by the indigenous Taíno people, the island was claimed in 1493 by Christopher Columbus for Spain during his second voyage. Later it endured invasion attempts from the French, Dutch, and British. Four centuries of Spanish colonial government influenced the island's cultural landscapes with waves of African slaves, Canarian, and Andalusian settlers. In the Spanish Empire, Puerto Rico played a secondary, but strategic role when compared to wealthier colonies like Peru and the mainland parts of New Spain. Spain's distant administrative control continued up to the end of the 19th century, helping to produce a distinctive creole Hispanic culture and language that combined elements from the Native Americans, Africans, and Iberians. In 1898, following the Spanish -- American War, the United States acquired Puerto Rico under the terms of the Treaty of Paris. The treaty took effect on April 11, 1899.
Document 2: Spanish West Indies: The islands that later became the Spanish West Indies were the focus of the voyages of the Spanish expedition of Christopher Columbus in America. Largely due to the familiarity that Spaniards gained from Columbus's voyages, the islands were also the first lands to be permanently colonized by Spanish in the Americas. The Spanish West Indies were also the most enduring part of Spain's American Empire, only being surrendered in 1898 at the end of the Spanish–American War. For over three centuries, Spain controlled a network of ports in the Caribbean including Havana (Cuba), San Juan (Puerto Rico), Cartagena de Indias (Colombia), Veracruz (Mexico), and Portobelo, Panama, which were connected by galleon routes.
Document 3: Puerto Rico: Originally populated by the indigenous Taíno people, the island was claimed in 1493 by Christopher Columbus for the Crown of Castile during his second voyage. Later it endured invasion attempts from the French, Dutch, and British. Four centuries of Spanish colonial government transformed the island's ethnic, cultural and physical landscapes primarily with waves of African slaves, and Canarian, and Andalusian settlers. In the Spanish imperial imagination, Puerto Rico played a secondary, but strategic role when compared to wealthier colonies like Peru and the mainland parts of New Spain. Spain's distant administrative control continued up to the end of the 19th century, helping to produce a distinctive creole Hispanic culture and language that combined elements from the Native Americans, Africans, and Iberians. In 1898, following the Spanish -- American War, the United States acquired Puerto Rico along with other Spanish colonies under the terms of the Treaty of Paris.
Document 4: History of Puerto Rico: Located in the northeastern Caribbean, Puerto Rico formed a key part of the Spanish Empire from the early years of the exploration, conquest and colonization of the New World. The island was a major military post during many wars between Spain and other European powers for control of the region in the 16th, 17th and 18th centuries. The smallest of the Greater Antilles, Puerto Rico was a stepping - stone in the passage from Europe to Cuba, Mexico, Central America, and the northern territories of South America. Throughout most of the 19th century until the conclusion of the Spanish -- American War, Puerto Rico and Cuba were the last two Spanish colonies in the New World; they served as Spain's final outposts in a strategy to regain control of the American continents. Realizing that it was in danger of losing its two remaining Caribbean territories, the Spanish Crown revived the Royal Decree of Graces of 1815. The decree was printed in Spanish, English and French in order to attract Europeans, with the hope that the independence movements would lose their popularity and strength with the arrival of new settlers. Free land was offered to those who wanted to populate the islands on the condition that they swear their loyalty to the Spanish Crown and allegiance to the Roman Catholic Church.
Document 5: Currencies of Puerto Rico: The situado was discontinued during the 19th century, creating an economic crisis, as a result of Mexico gaining its independence from Spain. Salvador Meléndez Bruna, the colonial governor in office, ordered the issue of provincial banknotes, creating the Puerto Rican peso. However, printing of these banknotes ceased after 1815. During the following decades, foreign coins became the widespread currency. In the 1860s and 1870s, banknotes reemerged. On February 1, 1890, the Banco Español de Puerto Rico was inaugurated and began issuing banknotes. The bank designed four series and placed three in circulation under Spanish rule. In 1895, a Royal Decree ordered the production of provincial peso coins.
Document 6: Cuba–United States relations: The hold of the Spanish Empire on possessions in the Americas was reduced in the 1820s as a result of the Spanish American wars of independence; only Cuba and Puerto Rico remained under Spanish rule until the Spanish -- American War (1898) that resulted from the Cuban War of Independence. Under the Treaty of Paris, Cuba became a U.S. protectorate; the U.S. gained a position of economic and political dominance over the island, which persisted after it became formally independent in 1902.
Document 7: History of Puerto Rico: On August 10, 1815, the Royal Decree of Grace was issued, allowing foreigners to enter Puerto Rico (including French refugees from Hispaniola), and opening the port to trade with nations other than Spain. This was the beginning of agriculture-based economic growth, with sugar, tobacco, and coffee being the main products. The Decree also gave free land to anyone who swore their loyalty to the Spanish Crown and their allegiance to the Roman Catholic Church. Thousands of families from all regions of Spain (particularly Asturias, Catalonia, Majorca and Galicia), Germany, Corsica, Ireland, France, Portugal, the Canary Islands and other locations, escaping from harsh economic times in Europe and lured by the offer of free land, soon immigrated to Puerto Rico. However, these small gains in autonomy and rights were short lived. After the fall of Napoleon, absolute power returned to Spain, which revoked the Cádiz Constitution and reinstated Puerto Rico to its former condition as a colony, subject to the unrestricted power of the Spanish monarch.
Document 8: Modern history: When the Central Junta fell to the French, numerous new Juntas appeared all across the Americas, eventually resulting in a chain of newly independent countries stretching from Argentina and Chile in the south, to Mexico in the north. After the death of the king Ferdinand VII, in 1833, only Cuba and Puerto Rico remained under Spanish rule, until the Spanish–American War in 1898. Unlike the Spanish, the Portuguese did not divide their colonial territory in America. The captaincies they created were subdued to a centralized administration in Salvador (later relocated to Rio de Janeiro) which reported directly to the Portuguese Crown until its independence in 1822, becoming the Empire of Brazil.
Document 9: Puerto Rico: Originally populated by the indigenous Taíno people, the island was claimed in 1493 by Christopher Columbus for Spain during his second voyage. Later it endured invasion attempts from the French, Dutch, and British. Four centuries of Spanish colonial government influenced the island's cultural landscapes with waves of African slaves, Canarian, and Andalusian settlers. In the Spanish Empire, Puerto Rico played a secondary, but strategic role when compared to wealthier colonies like Peru and the mainland parts of New Spain. Spain's distant administrative control continued up to the end of the 19th century, helping to produce a distinctive creole Hispanic culture and language that combined elements from the Native Americans, Africans, and Iberians. In 1898, following the Spanish -- American War, the United States acquired Puerto Rico under the terms of the Treaty of Paris.
Document 10: History of Puerto Rico: After the ratification of the Treaty of Paris of 1898, Puerto Rico came under the military control of the United States of America. This brought about significant changes: the name of the island was changed to Porto Rico (it was changed back to Puerto Rico in 1932) and the currency was changed from the Puerto Rican peso to the United States dollar. Freedom of assembly, speech, press, and religion were decreed and an eight-hour day for government employees was established. A public school system was begun and the U.S. Postal service was extended to the island. The highway system was enlarged, and bridges over the more important rivers were constructed. The government lottery was abolished, cockfighting was forbidden, and a centralized public health service established. Health conditions were poor at the time, with high rates of infant mortality and numerous endemic diseases.
Document 11: Puerto Rico: Originally populated by the indigenous Taíno people, the island was claimed in 1493 by Christopher Columbus for the Crown of Castile during his second voyage. Later it endured invasion attempts from the French, Dutch, and British. Four centuries of Spanish colonial government transformed the island's ethnic, cultural and physical landscapes primarily with waves of African slaves, Canarian, and Andalusian settlers. In the Spanish imperial imagination, Puerto Rico played a secondary, but strategic role when compared to wealthier colonies like Peru and the mainland parts of New Spain. Spain's distant administrative control continued up to the end of the 19th century, helping to produce a distinctive creole Hispanic culture and language that combined elements from the Native Americans, Africans, and Iberians. In 1898, following the Spanish -- American War, the United States acquired Puerto Rico under the terms of the Treaty of Paris.
Document 12: Decolonization of the Americas: The Latin American wars of independence were the revolutions that took place during the late 18th and early 19th centuries and resulted in the creation of a number of independent countries in Latin America. These revolutions followed the American and French Revolutions, which had profound effects on the British, Spanish, Portuguese, and French colonies in the Americas. Haiti, a French slave colony, was the first to follow the United States; the Haitian Revolution lasted from 1791 to 1804, when they won their independence. The Peninsular War with France, which resulted from the Napoleonic occupation of Spain, caused Spanish Creoles in Spanish America to question their allegiance to Spain, stoking independence movements that culminated in the wars of independence, which lasted almost two decades. At the same time, the Portuguese monarchy relocated to Brazil during Portugal's French occupation. After the royal court returned to Lisbon, the prince regent, Pedro, remained in Brazil and in 1822 successfully declared himself emperor of a newly independent Brazil. Cuban independence was fought against Spain in two wars (Ten Years and Little War). Cuba and Puerto Rico remained under Spanish rule until the Spanish -- American War in 1898.
Document 13: History of Puerto Rico: In 1898, during the Spanish -- American War, Puerto Rico was invaded and subsequently became a possession of the United States. The first years of the 20th century were marked by the struggle to obtain greater democratic rights from the United States. The Foraker Act of 1900, which established a civil government, and the Jones Act of 1917, which made Puerto Ricans U.S. citizens, paved the way for the drafting of Puerto Rico's Constitution and its approval by Congress and Puerto Rican voters in 1952. However, the political status of Puerto Rico, a Commonwealth controlled by the United States, remains an anomaly.
Document 14: Independence movement in Puerto Rico: After four hundred years of colonial rule by the Spanish Empire, Puerto Rico finally received its sovereignty in 1897 through a Carta de Autonomía (Charter of Autonomy). It was signed by Spanish Prime Minister Práxedes Mateo Sagasta and ratified by the Spanish Cortes.
Document 15: Puerto Rico: Puerto Rico (Spanish for ``Rich Port ''), officially the Commonwealth of Puerto Rico (Spanish: Estado Libre Asociado de Puerto Rico, lit.`` Free Associated State of Puerto Rico'') and briefly called Porto Rico, is an unincorporated territory of the United States located in the northeast Caribbean Sea.
ground_truth: a key part of the Spanish Empire
sub_queries: where did the immigration lead to? Answer: Puerto Rico
what was Puerto Rico before it was a commonwealth Answer: a key part of the Spanish Empire