By Greg Roumeliotis

(Reuters) - Mondelez International Inc <MDLZ.O>, the maker of Oreo cookies and Cadbury chocolates, said it was no longer pursuing the acquisition of Hershey Co <HSY.N>, two months after the U.S. chocolate company turned down its $23 billion cash-and-stock bid.

The abandoned deal, which would have created the world's largest confectioner, underscores the grip that a charitable trust has on the maker of Hershey's Kisses and Reese's Peanut Butter Cups. The trust which controls Hershey was set up by the company's founder over a century ago to fund and run a school for underprivileged children.

Hershey rejected a $107 per share acquisition offer from Mondelez at the end of June. An unrelated row between the trust and the Pennsylvania Attorney General's office ensued over the trust's governance, which resulted in a reform agreement being announced at the end of July.

The agreement calls for the trust's board to be expanded from 10 members to 13, and for five members to resign in order for 10-year terms to be enforced. One trustee resigned last month, leaving a total of nine openings.

Mondelez's Chief Executive Officer Irene Rosenfeld approached Hershey Chief Executive John Bilbrey again last week, and indicated that Mondelez would be willing to offer up to $115 per share for Hershey, according to a source familiar with the discussions who asked not to be identified because they were confidential.

Hershey responded that the trust would not be able to consider an offer until it is reconstituted next year, the source said. Even then, Hershey would not be willing to enter into deal negotiations for an offer of less than $125 per share, the source added.

Hershey did not respond to a request for comment. Its shares fell 11.4 percent in after hours trading in New York on Monday to $99.00.

"Following additional discussions, and taking into account recent shareholder developments at Hershey, we determined that there is no actionable path forward toward an agreement," Rosenfeld said in a statement.

The Hershey trust holds 81 percent of the company's voting stock, and so a sale is not possible without its approval. About two-thirds of its $12 billion in assets are in Hershey stock.

Mondelez's offer was half in cash and half in stock, sources have said. This means new board members of the trust, which must approve any sale of Hershey, could use such a transaction to substantially reduce its exposure in Hershey by partially cashing out on its stake.

"While we are disappointed in this outcome, we remain disciplined in our approach to creating value, including through acquisitions," Rosenfeld said on Monday.

ATTORNEY GENERAL UP FOR ELECTION

Even if the trust does decide to explore a sale of Hershey, it can still be overruled. In 2002, the trust put Hershey up for sale, citing a need to diversify its holdings.

At the last minute, it pulled the plug on a sale to chewing gum maker Wm. Wrigley Jr. Co for $12.5 billion, after the attorney general's office successfully petitioned a court to block the offer amid local community protests.

Pennsylvania's attorney general Kathleen Kane stepped down earlier this month after she was convicted of leaking secret criminal files to discredit a political adversary, and then lying about it. She was succeeded by her deputy Bruce Castor, and the post is up for election in November.

Pennsylvania state senator John Rafferty, the Republican candidate for attorney general, has said he does not think diversification for a charitable trust is always necessary, and has expressed "serious reservations" about a potential sale to Mondelez.

Democrat candidate Josh Shapiro has said he will "vigorously protect Hershey's continued success in Pennsylvania" and protect it from "multi-national corporations and Wall Street investors willing to destroy Pennsylvania jobs for their own profit."

Hershey's growth has slowed in the last two years as competitors such as Mars Inc expand their offerings, and premium players such as Chocoladefabriken Lindt & Spruengli AG <LISN.S> entered the U.S. market.

Mondelez, which has more of a global footprint than Hershey, is the second-largest confectionary company in the world, while Hershey ranks number five.

Their merger would put them in the top place at 18 percent of the market, according to market research firm Euromonitor International Ltd. The combined company would leapfrog Mars, which has 13.3 percent of the global market.

Last year, William Ackman revealed his activist hedge fund Pershing Square had built a stake worth about $5.5 billion in Mondelez, in what was seen as an attempt to push the company to boost earnings or sell itself.

Ackman had joined fellow activist Nelson Peltz as an investor in Mondelez. In a letter to his investors earlier this month, Ackman wrote that Mondelez shares are currently undervalued, and that the issuance of Mondelez stock to fund the acquisition of Hershey would likely be costly for Mondelez shareholders.

(Reporting by Greg Roumeliotis in New York; Additional reporting by Svea Herbst-Bayliss in Boston and Gayathree Ganesan and Sruthi Shankar in Bengaluru; Editing by Kirti Pandey, Tom Brown and Bernard Orr)