Hershey CEO John Bilbrey plans to retire from the chocolate company next year.

"I have had the privilege of working in consumer packaged goods for more than 35 years and leading The Hershey Company has been the highlight of my career," Bilbrey said Friday. "Our iconic brands, remarkable employees and commitment to making a difference in the world has made this a difficult decision for me, but now is the right time to begin the process of handing over the reins as CEO as it will allow me to spend more time with my family and wonderful grandchildren."

The news comes less than two months after Oreo cookie maker Mondelez ended talks to buy Hershey, in a deal that would have brought together some of the world's best known chocolate and snack brands.

Hershey makes Reese's peanut butter cups, Kisses and other chocolates and candies.

Bilbrey will retire on July 1, 2017 and stay on as a non-executive chairman. Bilbrey, who is 60, was named CEO five years ago and joined the Hershey, Pennsylvania-based company 13 years ago.

Hershey said its board has created a special committee to direct the CEO search process. The committee will review internal and external candidates.

"I am confident that the board will identify an outstanding candidate to lead The Hershey Company through this next phase of growth," Bilbrey said. "I look forward to working alongside the board to make the transition to new leadership a seamless process. Until that time, I will continue to work closely with my management team to grow the business and create additional value for all stockholders."

Shares of The Hershey Company gained 66 cents to $96.31 in Friday morning trading.