Panama's election commission reported that, with three-quarters of the ballots tallied, Juan Carlos Varela has captured 39 percent of the vote and was the declared winner.
Varela campaigned on a platform of anti-corruption and greater transparency in government.
Despite being the vice president, he had been stripped of most of his duties and had split from the governing Democratic Change party after a falling-out with President Ricardo Martinelli in 2011.
President Martinelli, who was prevented by law from running for a successive presidential term, instead supported the candidacy of Jose Domingo Arias. Arias had selected First Lady Marta Linares de Martinelli as his running mate.
Some voters regarded Arias' candidacy as an attempt to continue the Martinelli presidency.
Varela will assume the office of president in July and will serve a five-year term.
U.S. Secretary of State John Kerry offered his congratulations to the president-elect and noted that "International and domestic election observers, including those from the Organization of American States, the U.S. Embassy, the Carter Center, and the International Republican Institute reported that the polling process was transparent and fair."
2014: The Year in Music [PHOTOS]