Question: When did the place the immigration led to gain its independence from Spain?

full_context: Document 1: 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 2: 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 3: 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 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: 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 6: Republic of Cuba (1902–1959): After the Spanish -- American War, Spain and the United States signed the Treaty of Paris (1898), by which Spain ceded Puerto Rico, the Philippines, and Guam to the United States for the sum of $20 million. Cuba gained formal independence from the U.S. on May 20, 1902, as the Republic of Cuba. Under Cuba's new constitution, the U.S. retained the right to intervene in Cuban affairs and to supervise its finances and foreign relations. Under the Platt Amendment, the U.S. leased the Guantánamo Bay naval base from Cuba.
Document 7: 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 8: 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 9: 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 10: 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 11: 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 12: 51st state: Puerto Rico has been under U.S. sovereignty for over a century when it was ceded to the U.S. by Spain following the end of the Spanish–American War, and Puerto Ricans have been U.S. citizens since 1917. The island's ultimate status has not been determined as of 2012[update], its residents do not have voting representation in their federal government. Puerto Rico has limited representation in the U.S. Congress in the form of a Resident Commissioner, a delegate with limited no voting rights. Like the states, Puerto Rico has self-rule, a republican form of government organized pursuant to a constitution adopted by its people, and a bill of rights.
Document 13: 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 14: 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 15: 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.
ground_truth: 1897
sub_queries: where did the immigration lead to? Answer: Puerto Rico
when did Puerto Rico gain their independence from spain Answer: 1897