After a hand count of ballots that lasted a full week the Citizen Action Party’s Internal Electoral Tribunal on Monday declared Luis Guillermo Solís Rivera as its presidential candidate for the 2014 elections.

The difference between Solís and lawmaker Juan Carlos Mendoza, who placed second in the voting, was just 113 votes.

Solís received a total of 8,153 votes, while Mendoza received 8,040. Epsy Campbell took third place with 5,767 votes and Ronald Solís was fourth with 1,019 votes.

Silvia Castro, president of the party’s electoral tribunal, made the official statement at PAC headquarters in San José at 12:30 p.m. on Monday. Some 24,000 persons voted in the party’s primaries on June 21.

PAC President Oliver Pérez said a few anomalies were detected in some voting centers, and that party authorities “would investigate to the ultimate consequences.”

Solís, 55, is a political scientist, historian and university professor. He belonged to the ruling National Liberation Party (PLN) for nearly three decades, and even became its general secretary from 2002-2003.

PAC is currently the main opposition force in Costa Rica and is also the opposition party with the largest representation in the Legislative Assembly.