University of Santo Tomas was the first university of Costa Rica. It was established in San José in 1843. This university had close relations with the Roman Catholic Church and was closed in 1888 by the anti-clerical government of President Bernardo Soto Alfaro. The schools of law, agronomy, fine arts, and pharmacy continued independently, but Costa Rica had no other university until 1940, when those four schools (law, agronomy, fine arts, pharmacy) were united to form the University of Costa Rica (UCR), during the government of President Rafael Ángel Calderón Guardia.