(Reuters) - Procter & Gamble Co PG.N said it appointed Nelson Peltz to its board despite the activist investor narrowly losing a months-long proxy fight, the biggest ever involving a U.S. company.

FILE PHOTO - Nelson Peltz founding partner of Trade Fund Management LP. speak at the WSJD Live conference in Laguna Beach, California October 25, 2016. REUTERS/Mike Blake

The company’s shares were up 1 percent in after-market trading on Friday.

Immediately after its annual meeting in mid-October, P&G said it beat Peltz by a slim margin, but a preliminary tally by an independent election inspector, released a month later, showed otherwise.

“Because the election results were so close, and because a large number of shareholders voted for Nelson Peltz to be a director, the board has engaged in numerous discussions with Mr. Peltz regarding a board seat,” P&G said on Friday.

The consumer goods conglomerate said it increased its board size by 2 to 13 - to accommodate Peltz and appoint a new director in Joseph Jimenez, CEO of drugmaker Novartis AG <NOV N.S>.

P&G said it had recounted nearly two billion votes, many of which were paper ballots.

The recount showed that shareholders elected all eleven P&G nominees, including Ernesto Zedillo, for whom the votes cast were extremely close to those for Peltz.

Following recent discussions, Peltz and P&G agreed that the company would not be predisposed to take on excessive debt, reduce R&D spending, advocate for a break-up of the company or move the company out of its headquarters in Cincinnati - demands Peltz had made during the proxy battle.

“I look forward to bringing fresh perspectives to the boardroom, and working collaboratively with (CEO) David and the rest of the board to drive sustainable long-term shareholder value at P&G,” Peltz said in an email.

Peltz’s appointment is the latest twist in a contest that saw the two sides collectively spend more than an estimated $100 million on mailings, phone calls and advertisements to woo investors.

Peltz’s appointment is effective March 1 and the company also committed to re-nominate the investor as part of its board slate for next year’s annual meeting, P&G said.

The company also said it would link executive compensation to its sales and stock performance.