General elections were held in Costa Rica in 2018 to elect both the President and Legislative Assembly. The first round of the presidential election was held on 4 February 2018, with the two highest-ranked candidates being Christian singer and Congressman Fabricio Alvarado Muñoz from the conservative National Restoration Party and writer and former Minister Carlos Alvarado from the progressive Citizens' Action Party, gaining 24% and 21% of the votes respectively. As no candidate received more than 40% of the first round vote, a second round run-off election was held on 1 April 2018 and was won by Carlos Alvarado Quesada, with a landslide victory of 60.6% of the vote.

The previously dominant National Liberation Party suffered its worst results to date, ending third in the presidential run for the first time in its history with its candidate former Legislative Assembly President Antonio Álvarez Desanti winning only 18%. Other notable candidates were lawyer and entrepreneur Rodolfo Piza from the center-right Social Christian Unity Party with 16% and right-wing populist Juan Diego Castro with 9%.

In the 57-seat Legislative Assembly, the National Liberation Party won 17 seats, the National Restoration Party won 14 seats (although their parliamentary group later split in half due to factionalism), the Citizens' Action Party won 10 seats, the Social Christian Unity Party won 9 seats, the National Integration Party won 4 seats, the Social Christian Republican Party (an offshoot of PUSC) won 2 seats and left-wing Broad Front won 1 seat.

Electoral system The President of Costa Rica is elected using a modified two-round system in which a candidate must receive at least 40% of the vote to win in the first round; if no candidate wins in the first round, a runoff will be held between the two candidates with the biggest quantity of votes.Costa Rica IFES

The 57 members of the Legislative Assembly are elected using closed list proportional representation through the largest remainder method from seven multi-member constituencies with between four and 19 seats, which are based on the seven provinces.Electoral system IPU Party lists were required to alternate between male and female candidates, with parties also required to have three or four of their seven regional lists headed by a female candidate.Gender equality ruling aims for nearly 50/50 male-female Costa Rican legislature Tico Times, 27 May 2016

Presidential primaries Citizens' Action Party The internal elections for the Citizens' Action Party were held on 9 July 2017. The candidates were two former ministers of the Solís Rivera administration; writer Carlos Alvarado, former Minister of Labour and Social Issues, and economist Welmer Ramos, former Economy Minister. Alvarado won by 56% of the votes. Deputies Epsy Campbell, Ottón Solís and Vicepresident Ana Helena Chacón declined a potential run.

Carlos Alvarado was the first one of the party to announce his intention to run under the slogan of "I choose the future" (Elijo el futuro) and ran under a progressive platform, which sought to exalt the achievements of Luis Guillermo Solis's government and promised to continue with it. Meanwhile, Welmer Ramos's campaign focused more on a moderate and conservative campaign, under the slogan "A citizen like you" (Un ciudadano como usted) and openly criticized the then government to appeal to those who were upset with the administration.

Libertarian Movement The Libertarian Movement had its first primaries on 30 June 2017.

Candidates were deputy Natalia Diaz, and historic leader and deputy Otto Guevara Guth, who will attempt to run for presidency for the fifth time. Guevara won the primary over Diaz by a 10% margin. Otto Guevara's primary campaign was based under a right-wing populist inclination, stating that Donald Trump's presidential campaign had given him new inspiration to run, while Natalia Diaz's campaign promised to bring a new face to the party and offer a new alternative to the party's establishment.

After the 2016 municipal elections, the party lost its only mayor and 258 aldermen, leaving it with little power. Plus, due to Guevara's turnabout from libertarianism to religious conservatism, many party adherents created a new party: the Progressive Liberal Party, under former transport minister Eliécer Feinzag's leadership; or joined Social Christian Unity Party because of its new liberal stance on politics.

National Liberation Party The internal elections for the National Liberation Party were held on 2 April 2017. The candidates were Sigifredo Aiza Campos, former deputy for the Guanacaste province, then deputy and radio host Rolando González Ulloa, Antonio Álvarez Desanti president of the Legislative Assembly, former minister and presidential candidate who was supported by former president Óscar Arias Sánchez, and former president José María Figueres Olsen. Álvarez Desanti was chosen as the party's candidate.

Social Christian Unity Party

The Social Christian primary was held on 4 June 2017 with former president of the Health System and previous candidate Rodolfo Piza winning over then deputy Rafael Ortiz.

Other candidates Former Public Safety Minister Juan Diego Castro launched his unexpected presidential campaign presenting himself as a political outsider and with a strong anti-establishment and anti-corruption speech. Promising to "rule by decree" and with a very loud "hard hand" rhetoric (uncommon in Costa Rican politics as the country is famous for its political centrism), Castro has been compared to figures like Donald Trump and Rodrigo Duterte, and accused of right-wing populism and far-right positions, albeit he rejects the comparisons. He ran as the National Integration Party's nominee.

Four of the minor candidates lean towards the conservative evangelical community. These are former journalist and San José deputy Fabricio Alvarado for National Restoration Party, journalist Stephanie Campos for Costa Rican Renewal Party, perennial candidate and San José deputy Óscar López for Accessibility without Exclusion Party, and lawyer and twice Cartago deputy Mario Redondo for Christian Democratic Alliance a former Cartaginese provincial party but which expanded to the national level. The left-wing Broad Front nominated Alajuela deputy Edgardo Araya (:es:Edgardo Araya Sibaja). The far-left Workers' Party chose the trade unionist and high school professor Jhon Vega as its candidate. The right-wing New Generation Party chose its founder Sergio Mena as the presidential nominee. Finally, former Social Christian Unity Party's presidential nominee Rodolfo Hernández (:es:Rodolfo Hernández Gómez) launched his presidential campaign with the newly formed Social Christian Republican Party, a party formed by former PUSC members dissatisfied with the liberal-controlled Social Christian Central Committee, who claimed the party had lost its Calderonist origins

Presidential candidates Citizens' Action Party for Presidentfor Vice presidents Labor Minister (2014–2016) Executive President of the Joint Social Welfare Institute (2016–2017) Deputy in the Legislative Assembly(2002–2006 and 2014–2018) Labor Union Leader

for Presidentfor Vice presidents Deputy in the Legislative Assembly(2014–2018)

Other presidential candidates Candidates included in this section have received more than 2% support in popular vote. Minister of Farming (1987–1988)Minister of Governance (1988–1999)Deputy(1994–1998 and 2014–2017) Justice of the Supreme Court(2009–2013)Executive PresidentCosta Rican Social Security Fund(1998–2002) Minister of Public Safety(1994–1996)Minister of Justice(1997–1998) DirectorCosta Rica's Children's Hospital (2001–2014) National Liberation Party Social Christian Unity Party National Integration Party Social Christian Republican Party

Campaign Several topics like unemployment, corruption, economics, insecurity and poverty are among the main issues that concern the electorate according to polls.

But one particular event that cause uproar in the campaign was the "Cementazo" (lit. cement hit) scandal. A corruption scandal involving political figures of all the main parties, including candidate Otto Guevara, whose properties and parliamentary office were raided by the General Attorney investigating the case. Some analysts point to the Cementazo scandal as one of the reasons for the unexpected ascension in polls of hardline anti-establishment candidate Castro.

During the campaign Castro made a series of highly controversial statements that often caused polemic reactions. Among other things, he accused the Judiciary of having some of its female members ascending due to sexual favors, something that sprang harsh responses from female judges and judicial workers. Political figures from other parties reacted with outrage including Desanti's wife Nuria Marin and PAC's vice-president nominee Epsy Campbell. He later clarified that he was referring to one particular case of a known female friend of his. He also called for the removal of the prohibition on oil exploitation and gold mining calling those who opposed it "eco-terrorists and extremists". Desanti also said that "extremists should not dictate environmental policies" but mentioned that he opposes oil exploitation. Both Alvarado Quesada and Araya are staunch opponents of all forms of oil exploration and exploitation.

A surprising ruling from the Inter-American Court of Human Rights extending all rights enjoyed by heterosexual couples to same-sex couples made after Costa Rica's government lodged a motion for clarification also had an impact on the campaign. The ruling may require up to 22 signatory countries of the Pact of San José that recognize the contentious authority of the IACHR to change their laws to legalize same-sex marriage (whether by legislative or judicial methods, or both). Most polls show that most Costa Ricans oppose gay marriage albeit with large numbers supporting it (in a general ratio of 60–40%).Religion in Latin America Chapter 5: Social AttitudesReligion in Latin America Appendix A: Methodology Se mantienen actitudes conservadoras en Costa Rica sobre matrimonio igualitario y Estado laico Opponents of gay marriage were outraged by the ruling, causing an increase in social media support for Christian singer and journalist Fabricio Alvarado Muñoz from the staunchly conservative National Restoration Party (a normally small party with testimonial results mostly supported by the Evangelical Christian minority). Alvarado Muñoz was, for the first time for an Evangelical candidate, attracting Catholic voters. Nevertheless, Alvarado Muñoz' gain also saw a counter-reaction. Social media support for progressive pro-gay marriage candidate Carlos Alvarado Quesada was also notable, particularly among millennials and centennials who mostly support socially liberal policies. Some analysts point to a possible polarization between conservative and progressive voters, or among religious and secular or older and younger generations depending on the measure, which pushed both Alvarados into the second round. At least two homophobic attacks were reported.

During the run-off campaign, Alvarado Muñoz’ strategy focused on linking his rival with the somewhat unpopular government at the time by pointing out its flaws, errors and scandals. On the contrary, Alvarado Quesada tried to distance himself from Luis Guillermo Solís’ Administration, but at the same time highlighted its achievements. Muñoz also reinforced his idea of defending "pro-life and family" values, whilst Quesada insisted in wanting an inclusive country with no "second class citizens". Quesada's strategy focused in presenting Muñoz as inexperienced and unprepared, pointing out his delay in presenting his second government program as promised and contradictions between him and some of his close collaborators.