Procter & Gamble Co. said it beat Nelson Peltz by 6.15 million votes, only about 0.2% of its shares outstanding, a slim difference that is now headed to a weekslong recount to determine the final outcome of the most-expensive proxy fight in history.

The consumer giant had announced at its annual meeting in Cincinnati last week that its preliminary tally of votes showed the 11 board nominees were elected. The announcement surprised the activist camp whose own tally seemed too close to call.

...