Albert C. Barnes was a world-class art collector with a huge fortune and a chip on his shoulder who never forgot his working-class roots.

This was a man who really could hold a grudge.

In early 2002, in a lawsuit brought by opponents of the move of Barnes' art collection from Lower Merion to the Benjamin Franklin Parkway, he effectively reached from beyond the grave to strike one last blow at elite Philadelphia society, which he had battled for much of his life.

The vehicle for Barnes' revenge was a 60-year-old trust document that greatly restricted what could be done with his vast collection of early-modern and post-impressionist paintings, an artistic treasure trove estimated to be worth as much as $30 billion.

Barnes' vendetta is described in riveting detail in the documentary film Art of the Steal, which chronicles the machinations and courtroom gymnastics behind the planned move of the Barnes collection.

The film charges the move was engineered by an unholy alliance of Philadelphia politicians, charitable institutions, and wealthy benefactors who conspired to spirit the Barnes away from its home in Lower Merion - against what Barnes had specifically called for in his will.

It has played to generally positive reviews, but its central allegation - that the court decision allowing the move violated the terms of Barnes's original trust document - gets mixed reviews from lawyers and trust administrators who toil daily trying to divine the intent of long-dead benefactors.

What often gets lost in the emotional Barnes debate is that judges regularly toss out trust restrictions and substitute new provisions that probably would have appalled the original benefactors.

The baseline question in these cases is: Do the trust restrictions make sense any longer?

Often, they don't.

"I don't think estate lawyers were surprised," said Robert Louis, a Harvard- and Wharton-trained estates-and-trusts lawyer with the firm of Saul Ewing L.L.P., of the ruling by Montgomery County Orphans Court Judge Stanley Ott, permitting the move. "Barnes was a bizarre character. He imposed restrictions that you couldn't live with and couldn't work [with], so it was not a surprise."

Louis said that trust documents very often do not square with realities faced by trusts decades after they were established. So judges sometimes must sign off on revisions that substantially alter institutions established long ago to reflect the changed world around them.

And to do what is right.

"Barnes didn't create this art; he bought it, so the question is, does he have the right to do with it until the end of time whatever he wants," Louis said. "The answer, according to Ott, was no. He made restrictions, and they do not work any more. The fundamental point is the art, not Barnes."

What makes the Barnes case so intriguing is not only the vast art collection but the pugnacious personality of Barnes himself.

He grew up in poverty in Kensington and South Philadelphia. He was academically gifted and entered the University of Pennsylvania medical school directly after graduating from Central High.

His biographers say he hated polite Philadelphia society because the city's elite never accepted him. Throughout his life he consistently refused to loan his paintings to the Philadelphia Art Museum, dashed off nasty notes to leading Philadelphia dowagers, and declined to open up his collection to the public.

The Barnes museum is widely recognized as a singular, if eccentric, collection that draws much of its energy from the way Barnes, who made a fortune marketing eyedrops for babies, arranged scores of hugely important works on the walls of his Main Line mansion, often cheek-by-jowl.

He stipulated in his will that the paintings should never be moved. The filmmakers argue the move to the Parkway not only violates the terms of the trust agreement but would fundamentally destroy Barnes' unique artistic vision.

"The moral of the story is, never let your art collection get within 300 yards of a politician," said Mark Schwartz, a Bryn Mawr estates-and-trusts lawyer who represented one group of opponents in the Barnes litigation. He also appears in the documentary.

And yet as the court proceedings amply demonstrated, the foundation suffered from years of financial mismanagement, some of it the inevitable result of the way that Barnes himself had restricted its endowment. In his December 2004 decision, Ott said there was plenty of evidence the museum would attract substantial private support only if it moved to the Parkway.

The Barnes case, with its vast art collection, eccentric founder, and political intrigue, all feeding a ready market for conspiracy theories, is by far the best-known recent example of a disputed legacy in Philadelphia.

But decades earlier a likely far more significant trust case played out in the city involving Girard College, established in 1831 as a school for orphaned boys. Founder Stephen Girard stipulated in his will the school could accept only white boys. A young African American lawyer named William Coleman challenged that trust requirement over eight years of litigation, and it was overturned in 1958 by the U.S. Supreme Court.

The victory was especially sweet for Coleman because of his own painful brushes with racial discrimination. In the late 1940s, after he had graduated first in his class from Harvard Law School, he couldn't find a job with a law firm in Philadelphia, his hometown.

He had to go to New York to find a firm that would hire him.

It was after Barnes had died, following a challenge by Inquirer publisher Walter Annenberg, that the foundation was forced to give the public limited access to its galleries.

The courts found that Barnes had no right to completely exclude visitors since his foundation had received tax benefits.

There have been other court-ordered changes to the Barnes trust agreement over the years, but the latest surely must have him spinning in his grave.