Rafael Anselmo José Iglesias Castro, also known as Rafael Yglesias (18 April 1861 – 10 April 1924) was a Costa Rican politician who served as President of Costa Rica for two consecutive periods from 1894 to 1902.
 He was born to Demetrio Iglesias Llorente and Eudoxia Castro Fernandez, whose father was also president, the "Founder of the Republic" José María Castro who served two terms, 1847–1849 and 1866–1868. Iglesias traveled to the United States and to Europe to further his education. He also studied law at the University of Santo Tomas, but was unable to complete his studies due to his parents' economic difficulties at the time.  He went into business, but did not meet with much success in that arena.
 He got married in a civil ceremony to Rosa Banuet Ross in Cartago. They had two girls, Berta and Rosa (*official records of this marriage were destroyed in the earthquake of Cartago in 1910). He served as Minister of War from 1890-4. Iglesias and Rosa were divorced due to family pressure, and he married Manuela Petronila de la Trinidad Rodríguez Alvarado, daughter of President José Joaquín Rodríguez Zeledón (1890-1894). She was a private woman, and did not share his enthusiasm for the political arena.  They had a happy domestic partnership, and produced eleven children; Miguel, Eduardo, Luisa, Eudoxia, Bernardo Rafael, Margarita, Maria de los Angeles, Manuel, Jose Maria and Rafael.
 In 1894, at the age of 33, Iglesias was elected president by a majority of 23,000, and his election was marked with by largest voter turnout to date. Upon his election, he made official visits to Paris and London.  He had an audience with Queen Victoria, for whom he had great respect.  Duly impressed by the technological advancements he saw in Europe, he decided to return to Costa Rica and modernize it.
 He completed the construction of a national theater (Teatro Nacional), and was present at its inaugural performance of Faust presented by a French company under the auspices of Frederic Aubrey.  He established the colon as the unit of currency, and put Costa Rica on the gold standard.  He completed the Atlantic to Pacific railway, and built up the coastal town of Puerto Limon.  In addition, he set up a department of sanitation in the city.
 He oversaw the building of an electric tram, and brought municipal electricity to the city of Heredia.  He established a house of correction for minors.  He also instituted educational reforms, establishing a precedent for text books to be authored by Costa Rican citizens.  A firm believer in public education, he founded a school for the arts (Escuela Nacional de Bellas Artes) in 1897.
 Iglesias was the first president to send a scientific expedition to Isla del Coco.  Hearing of its rich natural resources, Iglesias closed the penal colony that was there, and decreed the island a nature preserve.
 Iglesias established a system of emergency health care in the provinces.  In 1895, Congress approved a measure to create a board of medicine, surgery and pharmacy, composed of all the doctors, surgeons and pharmacists that had been nationally certified.  In 1902, he established the pharmaceutical college (Instituto de Farmacia).
 He tried to amend the constitution to allow for a third term, but was defeated.  He ran for president again in 1909 and 1913, but was never re-elected.
 Iglesias still kept his hand in politics, and served, in 1919, as Plenipotentiary Ambassador to Guatemala.
 Iglesias died in San Jose in 1924, and was buried in the Cementerio General de San Jose.
 In 1981 he was awarded the title of "Benemerito de la Patria" for his years of service.
 Rafael Iglesias appeared on Costa Rican paper money in the former denomination of 5 colones. This edition was first printed in 1968.
 Also, Rafael Iglesias appeared on Costa Rica postal stamps, in different editions.