The expenditure of $17 million on a golf course and clubhouse by the trustees of the Hershey School - just one of a number of land deals costing tens of millions of dollars made in the last six years - has resulted in an investigation by the Pennsylvania Office of the Attorney General.

The investigation was confirmed by a spokesman for the Attorney General's Office.

The probe is certain to focus on the soundness of the spending at the giant charity that, under a 101-year-old legal document, exists to fund and sustain the Hershey School, the nation's largest residential school for impoverished children.

The Deed of Trust, established by Milton S. Hershey, who founded the chocolate company, strictly directs that trust money be used only for the direct care and education of the school's students.

Among the other deals in recent years was the Hershey Trust's purchase of the 18-acre Pumpkin World USA, a roadside market on Route 39, for $7.5 million. The school then leased the business back to the owners.

Pumpkin World was purchased around the same time as the Wren Dale Golf Course, in 2006.

Another aspect likely to be investigated, legal experts said, is a seeming conflict of interest involved in the acquisition of the golf club, which was losing money when bought by the trust.

Richard H. Lenny, the then-chief executive officer of the Hershey candy company, was an original investor in the club. The school's purchase of Wren Dale, at a price two or three times greater than its appraised and fair-market values, erased Lenny's losses.

Lenny was a member of the Hershey Trust board that approved the purchase and had a legal "duty of loyalty" to the trust fund's beneficiaries, the school, and its students. Being involved in the school's decision to purchase the golf club while at the same time having a personal financial interest in the club would seem to be a conflict, experts in trust law explained.

According to Pennsylvania law, the attorney general could seek to have Lenny return his profits from the golf-course deal to the trust fund, said Michael Hussey, associate professor at Widener Law School in Harrisburg.

If the attorney general finds the Hershey Trust was not prudent, or did not act in the interest of the trust's beneficiaries, it could take several actions, trust attorneys said. Among the legal remedies would be removing trustees, seeking to have them reimburse the trust fund, and reducing their compensation. Lawyers said it was likely the trustees have insurance that would protect them from personal financial liabilities.

"The real issue is overpaying for the property," Hussey said. "If the trust paid more than it should have for the property, the trust will have essentially wasted assets."

The decision by Attorney General Tom Corbett, the Republican candidate for governor, to investigate the Hershey Trust was disclosed less than one week after The Inquirer reported on the golf course deal. The investigation also creates a political tension: LeRoy S. Zimmerman, the head of the Hershey Trust, is a statewide Republican power broker and former two-term attorney general.

Zimmerman was appointed to the charity's board in 2002 and earned almost $500,000 in director fees on Hershey-related boards, according to the organization's latest annual nonprofit tax filing with the Internal Revenue Service.

Several other prominent Republicans, among them former Gov. Tom Ridge, sit on Hershey-related boards, and the political action committee attached to Hershey Entertainment & Resort Co. has contributed to the Friends of Tom Corbett. Hershey Entertainment is a for-profit subsidiary of the Hershey School - in effect, part of its endowment.

According to Pennsylvania campaign-finance records, the Hershey Entertainment PAC contributed $4,150 to the Friends of Tom Corbett in 2008. That was its latest contribution to Corbett. Hershey Entertainment operates the Wren Dale course, which has been renamed Hershey Links, under a lease arrangement with the school.

Corbett's campaign spokesman, Kevin Harley, said Thursday: "The campaign for governor has nothing to do with the investigation into the golf course deal."

Nils Frederiksen, a spokesman with the Office of the Attorney General, said the agency's charitable-trust section began an investigation last month after obtaining information about the trust.

"We already have an investigation into circumstances concerning the purchases of property," Frederiksen said. He declined to say whether the investigation centered on the golf course.

The Inquirer reported Sunday that the Hershey Trust bought the money-losing Wren Dale Golf Club for $12 million in the summer of 2006 - as "buffer land" for student safety, said Connie McNamara, a Hershey Trust spokeswoman. After buying the course in 2006, the school built a $5 million clubhouse, with a restaurant and bar, for the course. Hershey Links is now open to the public.

McNamara said Thursday, "We are cooperating fully with the Attorney General's Office, and we have no further comment at this time."

A statement from Zimmerman also was released to The Inquirer on Thursday: "Milton Hershey School Trust always cooperates fully with the Office of the Attorney General. We are under constant oversight by the Office of Charitable Trusts, which is appropriate given their oversight responsibility.

"In addition to filing a comprehensive annual report with the office, we are always forthcoming with any and all intervening requests for information they may have. We believe the facts will continue to support the conclusion that we have acted appropriately."

Anthony J. Colistra, the chairman of the Hershey Trust when the golf course was bought, said in a statement last month that the Wren Dale course was strategically essential to the school's growth plans and that the school feared a developer could build a housing development on it.

Robert Sitkoff, a trust law professor at Harvard Law School who has written about the Hershey Trust, said the golf course deal was possible because of the immense wealth of the charity compared with its modest philanthropic program.

The trust fund that operates the school is worth $7 billion to $8 billion, while the school enrolls about 1,800 students.

"If the school and the program were pushing up against the trust's capacity, it would be hard to see the trustees doing things like this. Because the school is so small, and the trust corpus so large, there is a temptation to skim," Sitkoff said.

"The big deal is that this is a federally subsidized fund meant to rescue needy children. The trust could rescue more kids, but it doesn't. Instead, the trustees are buying golf courses."

The Hershey School already had owned three other golf courses before the latest acquisition.