PRAGUE — President Milos Zeman of the Czech Republic failed to win re-election in the first round of a presidential vote on Saturday and will face a runoff in two weeks against the former president of the country’s Academy of Sciences.

Mr. Zeman and the runner-up in the first round, Jiri Drahos, advanced to a second round of voting because none of the nine candidates seeking the country’s largely ceremonial presidency received a majority of votes in the initial round, held on Friday and Saturday.

With almost all the ballots counted by the Czech Statistics Office, Mr. Zeman had 38.6 percent of the vote compared with 26.6 for Mr. Drahos.

Pavel Fischer, a former diplomat, was a distant third with 10.2 percent. Michal Horacek, a songwriter, finished fourth with 9.2 percent, ahead of Marek Hilser, a doctor, who had 8.8 percent. The three pledged their support to Mr. Drahos in the runoff.