Nelson Peltz narrowly won a seat on the board of Procter & Gamble Co., an official vote tally showed, an embarrassing turn of events for a company that weeks earlier had claimed to have defeated the activist investor.

After the most expensive proxy fight in history, an independent firm’s count of the roughly 2 billion votes that were cast found Mr. Peltz had 42,780 more votes than a P&G director he ran against, the company said. That is a margin of 0.0016% of the shares outstanding.

...