With big bucks on the line, an aged trotter showed younger foes the way home Saturday night in the $35,000 Joseph Ricci Memorial at Scarborough Downs.

Nine-year-old Stars Photo, driven by Heath Campbell, contentedly trailed leader Writteninthestars, a six-year-old gelding, before finding late racing room to win the classic.

Stars Photo trotted past Writteninthestars in the stretch and won by two and a quarter lengths in 1:59 1/5.

“He’s a smart old warrior,” said Bill Varney of Bangor, who owns the winner. “We had a good trip. But the question was if he could get out.”

The race is run to honor Joseph Ricci, who bought Scarborough Downs in 1979. He died five years ago, and his wife, Sharon Terry, is now the track’s president and chairperson of the board.

Horses are invited to race in the rich Ricci Memorial. This year’s victory marked the second consecutive win in the classic for Stars Photo. The gelding captured the race last year in 1:59 3/5 after an early move to the lead.

The fifth win in 15 starts this year for Stars Photo boosted the veteran’s seasonal earnings to nearly $37,000. Varney said the victory pushed the horse’s lifetime earnings to nearly $300,000.

In this year’s renewal of the memorial, driver David Ingraham hustled Writteninthestars into the early lead. They were on top at the quarter in a snappy 28 3/5 with Stars Photo sitting second followed by Baywood Barrister, a six-year-old gelding co-owned and trained by James Ray of Cornish, third.

Writteninthestars got the invitational trotters over to the half in 59 3/5 with Stars Photo second on the rail. At the three-quarter mark in 1:29 2/5, Writteninthestars held the lead, but Queponco Magic, an eight-year-old, moved up to third, mounting a bid on the outside for driver Drew Campbell.

In the stretch, Stars Photo, who stepped off a final quarter in 29 3/5, shook loose and trotted past Writteninthestars. As Stars Photo crossed under the finish wire, Campbell, celebrating the victory, flourished his whip in the air.

“He’s a great horse to drive,” said Varney, who readied the horse at his farm for the Ricci race. An amateur driver, Varney sometimes sits in the sulky behind Stars Photo.

Writtenthestars finished second with College Credit, a four-year-old mare driven by Kevin Switzer, third with Baywood Barrister fourth.