Leftist former Prime Minister Milos Zeman has won the Czech Republic's first direct presidential election.

With nearly all votes counted, Zeman won 55 percent support to 45 percent for Foreign Minister Karel Schwarzenberg.

Turnout on the second and final day of voting in the run-off election on Saturday was 59 percent.

Zeman will replace outgoing President Vaclav Klaus who steps down in March after two terms in office.

The role of the Czech president is largely ceremonial. Previous presidents were chosen by parliament.

The runoff between Zeman, 68, a former Social Democrat prime minister, and Schwarzenberg, a 75-year-old titled prince, had been seen as an extremely tight contest after the two finished almost neck-and-neck in the first round earlier this month.