Even as some polls remained open more than three hours after the deadline to close, President Nicolas Maduro, in seeking a third term, faced his toughest challenge yet from the unlikeliest of opponents.