Turkey's biggest election of its post-Ottoman era confounded pollsters and threw up surprises that underscored the difficulty of gauging the mood of the sharply polarized country.

President Recep Tayyip Erdogan came within a fraction of a percentage point of defeating secular challenger Kemal Kilicdaroglu in the first round.

Neither one's ability to break the 50% threshold sets up a historic May 28 runoff — Turkey's first — that Erdogan enters as the strong favorite.