The annexation of the Partido de Nicoya to Costa Rica is a historical event that refers to the incorporation of the territory of Nicoya (most of what is today's modern day Guanacaste) to the State of Costa Rica, which occurred on July 25, 1824.
 The annexation went through a plebiscite that took place in the city of Nicoya, in which, in the open town hall, the inhabitants of the municipalities of Nicoya and Santa Cruz voted to join Costa Rica, while the town of Guanacaste, today the city of Liberia, declined the annexation, however, on March 18, 1825, said population became part of Costa Rica by a law issued by the Congress of the Federal Republic of Central America. The term annexation of Guanacaste to refer to this event is considered historically incorrect.
 Currently, the annexation of the Nicoya Territory is an anniversary of Costa Rica, which is celebrated with civic and cultural events in schools and communities across the country every July 25. Guanacaste's official motto (which appears in its official sigil) is "De la patria por nuestra voluntad" (Of the homeland by our own will) for this reason.
 Nicoya became a legal political, administrative and legal entity subject to the Villa de Bruselas township, controlled by the government of Castilla del Oro. In 1527, the Spanish Crown created the Province of Nicaragua, segregating it from Castilla de Oro, and included the territory of the Kingdom of Nicoya, since it was requested to establish whether the territory of the Villa de Bruselas (located at the southern tip of Nicoya) belonged to the Province of Nicaragua (the new circumscription), or if it remained under the authority of Castilla de Oro, and a Royal Decree of April 21, 1529 resolved the conflict in favor of the Province of Nicaragua, when the Villa had ceased to exist.
 In 1554, the Corregimiento de Nicoya was established, segregating it from the Province of Nicaragua. The Mayoralty of Nicoya became an entity that was directly dependent on the Royal Audience of Guatemala. In 1555, as a result of the war of conquistadors in the viceroyalty of Peru, the Audiencia of Guatemala appointed Coroner of Nicoya to Pedro Ordóñez de Villaquirán. In 1566, Miguel Jiménez Ferrer was named Mayor of Nicoya, becoming the Corregimiento in Mayoralty of Nicoya. Although the Corregidor and the Mayoralty had the same faculties, the difference was that the Corregidor was appointed by the Audiencia, while the Mayor was appointed directly by the King through the Council of the Indies. The High Mayor of Nicoya continued to depend on the province of Nicaragua until 1588.
 In 1573, the Province of Costa Rica was officially created to replace the Province of Nuevo Cartago y Costa Rica (1540). In 1576, Diego de Artieda Chirino y Uclés was appointed governor in charge of the three entities: Nicaragua, Nicoya and Costa Rica. This situation was maintained until 1588, when Artieda was deposed by the Audiencia of Guatemala, and autonomy was granted to the three entities separately. Between 1588 and 1593, Nicoya enjoyed political autonomy, both in Nicaragua and Costa Rica.
 In 1593, it was decided to add the Mayor of Nicoya to the province of Costa Rica, when King Phillip II confirmed the capitulations given to Diego Artieda Chirino in 1573, appointing Fernando de la Cueva y Escobedo. During the period 1593 to 1602 period, the governor of Costa Rica was appointed at the same time Mayor of Nicoya. This situation was maintained until 1602, when the High Mayor was declared again autonomous. From 1602 and for eighty years, the Mayor of Nicoya enjoyed political autonomy in its functions, independent of the colonial governments of Nicaragua and Costa Rica. Their high mayors or corregidores were directly appointed in Guatemala, and their faculties were those of minor governorates. This condition was maintained until 1786 when the intendancy regime was created in the Kingdom of Guatemala.
 In 1786, the High Mayor of Nicoya was once again united to the Province of Nicaragua, when it was incorporated as a party to the Intendency of León, created as a political-administrative dependency of the Kingdom of Guatemala, through the Royal Decree of December 23, 1786 The Party of Nicoya was under the government of a Subaltern Political Chief.
 In 1812, the Intendancy of Leon was united with the Province of Costa Rica (that was under a military government dependent on the Captaincy General of Guatemala, with the same faculties of an Intendance but with a smaller rank, since in the hacienda it depended on the Intendency of Leon), in a new circumscription, the Province of Nicaragua and Costa Rica, but during the Bourbon Restoration in Spain (1814-1820) it was again divided into two entities: Intendencia de León and Provincia de Costa Rica.
 In 1820, when the Constitution of Cádiz was restored in 1812, the Province of Nicaragua and Costa Rica were reestablished. On December 13, 1820, the new Provincial Council divided the territory into seven parties: Segovia, El Realejo, León, Granada, Nicaragua (Rivas), Nicoya and Costa Rica.
 After September 15, 1821, the signing of the Central American Declaration of Independence, Miguel González Saravia y Colarte, Political Chief Superior and President of the Provincial Delegation of the Province of Nicaragua and Costa Rica, signed on September 28, 1821, act of conditional independence of the Province of Nicaragua and Costa Rica, known as the Acta de los Nublados, and on October 11, 1821, the act of absolute independence of the Province of Nicaragua and Costa Rica. However, on October 15, 1821, the Cabildo of Cartago agreed to annul the votes cast previously and to adopt the decision to stay out of the events, without assuming any commitment to Guatemala or León. On October 29, 1821, an open meeting was held in Cartago, in which a document was drawn up proclaiming the independence of Costa Rica from the Spanish Government. On December 1, 1821, the Covenant of Concord was proclaimed, which restores the Province of Costa Rica, separated from the Province of Nicaragua, which still maintained the remaining six parties, including Nicoya.
 Due to its geographical location, the Nicoya party maintained continuous and very close commercial relations with Costa Rica, on which it depended for certain administrative branches, and for other matters, it depended on Nicaragua. In very important administrative matters, he went directly to the Hearing of Guatemala.
 The three main populations of the party at the time of annexation were:
 The bases of the annexation of the party from Nicoya to Costa Rica have deep roots in the past. Although Nicoya's ties with Nicaragua were always very close, Costa Rica was not unaware of this connection. For the annexation to occur, there were many determining factors that include geographical realities, political ties, historical situations and socio-economic contexts, where the proximity and commercial activity of Nicoya with the port of Puntarenas was a determining element. But there were also realities within the same populations that constituted the party, which influenced the decision to be made, since there were also technical, socio-economic and cultural differences between two dissimilar groups that made up the party's population: annexationists, formed by a nucleus of large cattle ranchers, descendants of Spaniards, with close ties to Nicaragua. Opposed to this traditionalist and powerful circle, the group of annexationists, made up of indigenous people, ladinos and mestizos, was numerically superior, with a great affinity to each other, with a closed economy and common deficiencies, which saw in the annexation a solution to many of those deficiencies.
 In 1813, the governor of Costa Rica, Tomás de Acosta y Hurtado de Mendoza, wrote to the president of the Audiencia of Guatemala a letter stating the scarcity of the population of Costa Rica (only 60,000 inhabitants), which prevented him from choosing a Deputy for the Cortes of Cádiz, proposing that the Nicoya party join Costa Rica to carry out this election, in which Florencio del Castillo was chosen as representative of both territories. After this election, the political ties between the representatives of Nicoya and Costa Rica became closer, as Nicoya had to send his constituents to Cartago for various votes, such as the elections for the representatives before the Provincial Delegation of Nicaragua and Costa Rica.
 After Central American independence in 1821, Costa Rica decided to separate from the Provincial Council, to which Nicoya remained subject until 1824. In spite of this, Nicoya continued to send his representatives to Cartago, since the independence agitation determined the need for frequent renewal of officials and the creation of government agencies, which strengthened the municipalities, such as Santa Cruz.
 The political-electoral bonds between Nicoya and Costa Rica were strengthened so that in 1822 the possibility of the incorporation of Nicoya to Costa Rica was already considered, when the bases of the union of Costa Rica to the First Mexican Empire were dictated it established: ""they will include for their benefit the party of Guanacaste and Nicoya in the part that they claim and want to adopt by the identity of interest, in which case the northern part of the province in that part, will be the one that has recognized that party on the mountain of Nicaragua".
 The creation of the First Mexican Empire by Agustín de Iturbide in 1821 provoked the appearance of imperialist and republican factions, confronting each other, in several countries of the isthmus. In the case of Nicaragua, this was reflected in the struggle for local power between the cities of León and Granada, which struggled for much of the nineteenth century. In 1823, two years after independence, there was an uprising against the conservative government in Nicaragua. This rebellion, led by the liberal José Anacleto Ordóñez Bermúdez, was a consequence of the intention of the conservatives to annex the country to the Mexican Empire of Agustín de Iturbide. The uprising of Ordóñez continued despite the dissolution of the Mexican Empire, with new uprisings in 1824 led by Leon Méndez and Domingo Galarza, and then another blow from Ordóñez. This situation of internecine wars and coups d'etat was prolonged with the war between Argüello y Cerda (1827–29), and later with several uprisings that will culminate in 1855 with the National War of Nicaragua. In the case of Costa Rica, there was a short civil war in April 1823, which was settled with the Republican victory, so that on the eve of the annexation, Costa Rica showed a more stable outlook than Nicaragua.
 In 1823, the Costa Rican lawyer and deputy to the Central American Federal Congress, Pedro Zeledón Mora, stated in a letter dated in León, Nicaragua, the convenience of incorporating Nicoya to Costa Rica: "(...)it is very advantageous because of the increase in land and other utilities, without prejudice to it (Nicaragua), which neither makes nor will make use of it.".
 During the colonial period, the province of Costa Rica had a precarious economic existence. With the purpose of strengthening it, the Spanish authorities decided the incorporation of the Nicoya Corregimiento to Costa Rica during part of the 16th century. During the 17th and 18th centuries, the communities that inhabited both sides of the Gulf of Nicoya had an active trade. Nicoya traded with the city of Espíritu Santo de Esparza and Puntarenas. The increase in trade led to the growth of new settlements, such as the one that led to the establishment of the town of Guanacaste in 1768, and the concentration of ladinos in the area of Diriá in 1814, which gave rise to the town of Santa Cruz. Nicaragua also had pretensions about the territory, particularly because of the existence of large cattle ranches in the northern region, which were owned by Nicaraguan landowners settled in Rivas. However, the authorization of the port of Puntarenas in 1814 made Nicoya and Santa Cruz grow economically.
 At the beginning of the 19th century an active commercial exchange between the Tempisque region and the valleys of Bagaces and Cañas was consolidated, forming an economic unit with the city of Esparza, which in turn traded with San José in the Central Valley of Costa Rica. In 1809, the colonial authorities detached tobacco production from the Bagaces and Cañas valleys of the Tabaco [sic?] Factory in Granada (Nicaragua) and joined it to the San José tobacco factory, allowing the development of the Josefina economy. As the trade in the Tempisque River area increased, the farmers who had farms on both banks of the river had to face a series of administrative obstacles because the territory belonged to two different units.
 The fluvial route through the Gulf of Nicoya became for the inhabitants of the party an option of transport and commerce more accessible than the terrestrial one, diminishing the dependency of the party of the Nicaraguan populations, and increasing the affinity with Puntarenas. The activity of this port was making feel little by little its economic magnetism over the whole area of the gulf, as a center of demand for agricultural and livestock products, for its trade with the Central Valley and as a contact point to move between the different provinces and viceroyalties of the Spanish Empire, due to the constant arrival of ships from all over the continent.
 Among the background that led to the annexation, ethnic and socioeconomic factors have also been mentioned. The poorer populations of Santa Cruz and Nicoya were more identified with each other than with the village of Guanacaste, since Nicoya was a city populated mostly by indigenous people and Santa Cruz was inhabited by ladinos, while the inhabitants of Guanacaste were descendants of Spaniards and large landowners. The large cattle ranches were almost all from the Tempisque River to Nicaragua, while the land was more divided between the passage from Diriá to Nicoya. These differences would later be reflected in the result of the vote in the open meeting of July 25, 1824.
 On March 3, 1824, the government of the State of Costa Rica officially proposed to the municipality of Nicoya its voluntary incorporation into the country, by means of a document inviting her "if it was convenient to meet her Province without opposing wills". On July 4, an open town council was convened in Nicoya to discuss the matter, but attendees declined the invitation on the grounds that "this Party ... can not be a dissident."
 On July 25, 1824, a second plebiscite was called in the city of Nicoya. After the deliberation, the incorporation into Costa Rica was decided on in the open meeting, drawing up an act in which the main reasons for the same are noted, pointing out the advantages in terms of trade, the desire to participate in the advances that are felt in Costa Rica. Costa Rica, the economic, administrative and public service benefits, the creation of schools, security and quietness, referring to the state of war that Nicaragua lived at that time and the fear that it would spread to the populations of the Party, in addition to point out the indigence in which the towns of the same one and the own geography of the territory are like justifications for the union. Three days later, another similar plebiscite was held in Santa Cruz, with the same result. The election was by majority vote, with 77% of the Party's population in favor of incorporation, and 23% contrary to it. The town of Guanacaste was the only one that declined the annexation, due to the links that its inhabitants had with the city of Rivas, Nicaragua.
 The Act of Annexation of the Party of Nicoya to Costa Rica is a document signed on July 25, 1824. This document summarizes the aspirations and aspirations of all kinds of the people of the party, who, with a closed economy and common needs, believed solve them by taking the step of incorporating their communities to Costa Rica.
 The signatories of the act record in it as justification to the decision taken the following prerogatives:
 The Act is signed by 40 people, among which the names of Manuel Briceño, Subaltern Political Chief and Commander of Arms of the Party stand out; the councilors of the Municipality of Nicoya, Toribio Viales, Ubaldo Martínez and Manuel García, as well as military and civil authorities and "the principals of this town". In the change of opinion between the council of March 3 and that of July 25, the active participation of the Briceño Viales family was pointed out, which stood out at that time in the social, economic, religious, military and political aspects in Nicoya. At the time of the annexation, the Political Chief of Nicoya was Manuel Briceño, and of the 25 signatories of the act of annexation, 10 belonged to the Briceño Viales family and held important positions in the town hall. The absence among the signatories of Cupertino Briceño, cousin of Manuel Briceño and four times mayor of Nicoya (1825, 1833, 1836 and 1839), who has traditionally been designated as the leader of the annexation initiative, but who, according to Melendez, he was out of the country at the time of the Cabildo. Cupertino Briceño, however, repeatedly occupied the main political posts in the Cabildo and helped shape and profile the town of Nicoya in its first years of incorporation into Costa Rican territory, and went to him, as mayor of Nicoya in 1825, who was responsible for signing and presenting all the documents and minutes of the annexation before the Legislative Assembly of Costa Rica. The original copy of the Actis in the National Archive of Costa Rica.
 The annexation of the party from Nicoya to Costa Rica has had political, economic, social and cultural repercussions.