For the board of the Hershey Trust, which controls 77 percent of the voting shares of Hershey Food Corporation, last week’s announcement that it was calling off the sale of the chocolate company to the Wm. Wrigley Jr. Company was an embarrassment. The Trust had seriously misjudged both the depth of the anger that the sale would engender in the Pennsylvania community where the company is headquartered, and the power of stakeholders—including residents and workers—to obstruct a sale.

But for the company’s management, the decision to call off the Wrigley deal was clearly a relief—despite all the turmoil. While Hershey management, led by chief executive Rick Lenny, had refused to comment on the proposed sale in the media, it had communicated with employees, making it clear that it was uncomfortable with the Trust’s plans as they were.

The decision to sell was apparently prompted by a meeting with representatives of Pennsylvania attorney general Mike Fisher. The attorney general had been investigating potential conflicts of interest at various Hershey holdings: the Trust was established in 1918 to oversee the Milton Hershey School, which educates and shelters nearly 1,300 underprivileged students. According to members of the Trust board, it was suggested that the Trust was breaching its fiduciary responsibility to the students by failing to diversify its holdings.

In late July, the Trust announced its plans to sell the company, triggering an immediate firestorm of criticism. Residents and workers feared the likely job loss and reduction of the local tax base. The Hershey School’s alumni association formally opposed any deal, saying it had the potential to harm the unique community. Neighbors erected yard signs opposing the sale. Robert Vowler, executive director of the trust, felt compelled to hire private security company Wackenhut to patrol his residence as well as the parking lot of the trust’s offices, which are in Milton Hershey’s former home.

Attorney general Fisher, meanwhile, emerged as the most vocal critic of the deal, denying that he had suggested the sale. In late August he asked a local court with jurisdiction over charitable trusts to halt the sales process temporarily, arguing a sale would cause “irreparable harm” to the community in which the Hershey school was located. The court agreed, and granted a temporary injunction.

While most observers believe the injunction would eventually have been overturned, the fact that the Trust found itself at the center of a public maelstrom is indicative of a massive failure of public relations. The announcement was made without any consultation with affected stakeholders. Either the Trust didn’t understand how the community would react to the announcement, in which case it was horribly out of touch; or it didn’t care, in which case it was colossally arrogant.

It’s hard to see how the Trust could have imagined any reaction other than the one it got. The town of Hershey has a population of around 22,400, and Hershey Foods employs 6,200 of them. Milton Hershey built his chocolate factory here in 1903, and went on to construct hundreds of employee-owned homes, a local trolley system, a sewage treatment plant, a power facility, a community theater, an amusement park, golf courses and the school. Even the streetlights are in the shape of Hershey’s Kisses.

“Assuming a sale occurs, which looks almost certain, the fabric of the community will change,” said Lehigh University finance professor Samuel Weaver. “It could spell the end of one of the last company towns in the country.”

Under the circumstances, it would surely have been advisable to take the time to understand the likely objections to the sale. Public relations is about communication, and communication—although we sometimes forget it—is a two-way process. That means listening is as important as—and often more important than—speaking. Listening would have involved engaging those who opposed the sale, holding town hall meetings to explain the reasons for the decision and listening carefully to alternative suggestions for accomplishing the Trust’s financial objectives.

(Last week’s article about BAA in the U.K., provides a blueprint for how a smart, stakeholder-driven company would have approached such a decision.)

As it was, the Trust succeeded in alienating almost all its key stakeholders: its neighbors, the company’s employees, local politicians, even management at Hershey. Lenny, working with a team of advisors that includes public relations firm Kekst & Company, understood the disruptive impact the sale could had and had initially resisted the instruction to look for a potential buyer, until he was told the company would be sold with him or without him.

Lenny did not publicly challenge the Trust’s decision, but he distributed an e-mail message to employees on the day the Trust went public with its decision to sell the company.

“I can imagine how you are feeling following this morning’s announcement,” he wrote. “Four months ago, when I first was made aware of the Hershey Trust Company’s decision, I certainly felt the same shock and disappointment. I feel it even more so today given the Trust’s public statement of its intentions.”

The company, he said, had suggested a plan under which it would buy back a significant portion of the Trust’s shares at a premium. The proposal “would have satisfied the Trust’s stated objectives of diversification of its assets, and provided the Trust with a premium for its investment.” But the Trust had rejected that proposal.

Lenny admitted he shared employees’ uncertainty: “Neither I nor anyone else can tell you what we might sell for, if, in fact, a transaction does occur…. Over the next several weeks the uncertainty and speculation about this process will be significant…. As difficult as it may be, please don’t fall victim to assuming the worst and succumb to debilitating rumors that fuel fears or uncertainty.

“The Hershey executive team is committed to communicating what we can, when we can. If we don’t have the information you want or can’t answer specific questions, we’ll tell you.”

The Chocolate Workers union had waged a bitter strike—demanding better health benefits—earlier this year, but found itself aligned with management against the strike. “People are afraid, and they’re angry,” said Bruce Hummel, business agent for Local 464 of the union. “It’s not just about jobs. If the company is sold, nobody really wins.”

And external observers—even Wall Street analysts—understood that the situation was about more than money. A food industry investment banker told Business Week recently, “A company is a web of relationships with employees, customers, and suppliers. Every time you go through [the sale process] it disrupts those relationships.” If an investment banker—presumably a pretty hard-nosed numbers guy—understands this, why don’t the trustees?”

The trustees never addressed the concerns of the community. In fact, other than a few comments defending plans to sell the company, members of the Trust were largely silent, preferring to communicate with the media through Rick Kelly, a Harrisburg public relations executive hired as Trust spokesman.

Kelly acknowledged that the Trust’s moves were not necessarily beneficial for the community but insisted the Trust’s role was to protect its investments. “People naturally have a fear of the unknown,” Kelly says. “If a sale were to proceed, the focus has been on the worst-case scenario, and that’s unfortunate. We don’t see a worst-case scenario or anything near that happening.”

Not surprisingly, those remarks failed to assuage the community’s fears, and pressure continued to mount. Under the circumstances, it is a tribute to how effectively Lenny and his team followed the Trust’s instructions—despite their own objections—that the Trust ended up with two very healthy offers. But when the time came to consider those offers, trustees had experienced the community’s wrath first hand—one told reporters his wife was afraid to go shopping because of the looks she got in the local supermarket—and had cooled on the idea of a sale.

Late on Tuesday, the Trust announced that despite two healthy bids, including a $12.5 billion cash-and-stock offer from Wm. Wrigley Jr. Co., it had decided, by a vote of 10 to 7, to reject those offers and take the company off the auction block. The stated reason was that neither bid was satisfactory, but in reality it was clear the Trust had succumbed to political pressure.

“In retrospect, none of the turmoil we experienced need have occurred,” said Lenny in another e-mail to employees. “Unfortunately, we can’t rewrite history. We can, however, return our focus to the future of our company…. The good news is that we have plenty of work ahead and a renewed sense of direction and purpose.”

Writing in Slate, financial reporter Daniel Gross argued that the decision to abandon the sale cheated the children of the Hershey school. “Preventing the sale is likely to be portrayed as a triumph of small-town values. In fact, it is a sock in the nose for good corporate governance and fiduciary responsibility—two private-sector fundamentals that have taken a beating of late.

“Here was an instance where all fiduciaries performed as they were supposed to. The trust sought to diversify its assets so the beneficiaries wouldn't be too dependent on a single stock. The management and board of Hershey, acceding to the desires of a controlling shareholder, initiated and aggressively pursued a process that likely would have resulted in their losing their own jobs. The investment banker pursued and rounded up a highly attractive offer.

“But the process was short-circuited by public officials who failed to adhere to their own responsibilities.”

In fact, the decision to abandon the sale is an example of good corporate governance, of an approach to corporate management that recognizes the legitimate interest of multiple stakeholders, the ability of those stakeholders to influence the future success of the organization, and the fact that even shareholders have interests that go beyond dollars and cents.

It is also an indication of what governance is likely to look like in the future. While the Hershey Trust was in a unique position—answering to students, rather than to shareholders, and located in a community both emotionally and financially dependent on its relationship with the company—the demand that all stakeholders’ voices be heard is not unique.

Companies that learn to listen to those voices will avoid the embarrassment the Hershey Trust suffered last week.