He withdrew the Concordat with the Holy See, expelled both the Jesuits and the bishop of Costa Rica from the country, and in 1884 passed laws that placed cemeteries under state control, introduced civil marriage, and legalized divorce.
The most powerful figure within his government was his brother-in-law, former president José María Castro Madriz, who served as minister of foreign and religious affairs, education, justice, and public aid.
To compensate him, cabinet minister Bernardo Soto signed a deal that gave Keith 800,000 acres (3,200 km2) of tax-free land along the railroad, plus a 99-year lease on the operation of the train route.
President Fernández died in office shortly after declaring war on Guatemala which, under Gen. Justo Rufino Barrios, had embarked on the reunification of the dissolved United Provinces of Central America.
National Highway CR-27 connecting the capital city of San José with the Pacific coast's port of Caldera is named in his honor.