Opinion polls published just after voting was due to end suggested challenger Péter Magyar could oust the prime minister.