Painting a picket fence isn’t really fun, despite what Tom Sawyer said.

It’s hot, sweaty work. It takes a good long while, and the paint only sometimes goes where it’s supposed to. That’s what two dozen do-gooders found out the other morning at the Presidio, when the call went out for volunteers to paint the new wooden fence surrounding the beloved, forlorn Presidio Pet Cemetery, under the premise that doing so was a rare bit of good fortune.

“I could be doing better things right now,” said Leo Thomson, 10. “Like playing baseball. But I guess this is better than doing homework.”

In his right hand was a paint roller. Before him stretched a boundless vista of unpainted wooden pickets, about 500 feet worth.

“That’s a long fence,” he said.

Now Playing:

The cemetery, established in 1952 and located directly below the viaduct leading to the Golden Gate Bridge, is re-emerging these days from its decade of covered-up oblivion. It was shrouded by a construction platform during the rebuild of Doyle Drive until a few months ago.

Once more the graves of Wiggles, Mr. Iguana and Randy the Rat are coming into view, ready to welcome new generations of the somewhat reverent.

Much remains to be done. The gophers and the weeds have moved in, and scores of grave markers are falling apart. Because of a split in the wood, the grave of Erskine the cat has become the grave of Ersine the cat.

Tending the graves will come later, after the fence painting. The instructions for that were not complicated.

“Just get the paint on the fence,” head Presidio Trust painter Alberto Sandoval told his volunteers, issuing rollers, brushes, paint buckets and plastic gloves to all hands. “I don’t care how you do it.”

There was sloshing, slopping and splashing. There was dabbling and dampening. Much paint ended up on many hands, gloved and ungloved, including those of volunteer René Batt.

“They conned us into thinking we were doing something wonderful,” she said, smiling. “A once-in-a-lifetime opportunity, that’s what they said this is.”

It turns out that the once-in-a-lifetime opportunity, which is much the way Tom Sawyer described fence painting to his pals, will happen again on Saturday, when it will be time for more volunteers to apply the second coat of paint.

After that, the pet cemetery will officially open to the public, although the Presidio Trust cautions that access is limited pending completion of a sidewalk and crosswalk. There’s no room for more pets, although Presidio spokeswoman Lisa Petrie says that pet ashes may be scattered at the site if the dearly departed’s humans apply for a permit.

While the painters worked away, the spirits of those dearly departed hovered close at hand, their gravestones telling all:

“Fremont — a great cat.”

“Wiggles — beloved Pom of the Kellums”

“Charlie was my favorite pet I ever had — he was my bird”

The Tom Sawyer strategy, dusted off by the feds 143 years after the novel’s publication, worked. In the famous tale, Tom tricks his pals into painting a fence by making them believe it’s fun. In real life that motivation was aided by a midmorning break of free brownies, cookies and gummy worms, a staple of contemporary youth beyond the ken of Mark Twain.

Perhaps it was the sugar rush, or perhaps it was the spirit of Randy the Rat, but the volunteers grabbed their rollers and redoubled their efforts. As the clock struck noon and time ran out, the last bit of paint was sloshed onto the last picket.

“We got it all done,” said Rob Thomson, clearly relieved. Thomson is the preservation officer for the Presidio Trust, official guardian of the cemetery and a man who cares as much about Randy the Rat’s legacy as anyone.

“I think it was the snacks,” he said. “That made the difference. Clearly, the gummy worms worked.”

Steve Rubenstein is a San Francisco Chronicle staff writer. Email: srubenstein@sfchronicle.com Twitter: @SteveRubeSF