AUGUSTA — A portrait of King William, a prominent Maine harness racing horse from an era when racing was the sport of kings, is back in Maine 141 years after it was painted by a Maine artist and horseman.

The painting by George H. Bailey was recently bought from a Georgia art dealer by the Hallowell-based Lost Trotting Parks Heritage Center. It will be a centerpiece of the nonprofit’s effort to preserve and spread the stories of horsemen and horses in Maine from a time when horses figured prominently in transportation, work and entertainment.

“This was the time when the horse was king,” Stephen Thompson, creative director of the Lost Trotting Parks Heritage Center, said of the 1873 painting.

“Horses were the key to the economy, and the key to happiness and productivity in people’s lives.”

In 1874, the painting was selected by J.W. Thompson as the front engraving for his book “Noted Maine Horses Vol. I.”

Stephen Thompson and others, including Maine State Historian Earle Shettleworth, celebrated the return of King William’s likeness to its home state on Wednesday at the law offices of Lipman and Katz in downtown Augusta.

Thompson, no relation to J.W. Thompson, learned through his cousin Clark P. Thompson that the King William painting had been purchased at an art auction in South Carolina by a Georgia art dealer named Joe Hughes. Clark Thompson is the author of the book “Maine’s Trotting Horse Heritage Trail,” which includes a chapter about Bailey.

“I said, ‘It’s time to bring King William back home,’ ” Stephen Thompson said.

Thompson and Hughes negotiated a $2,000 price, about half of which came from Thompson and donations from individuals, businesses and groups. When Hughes said he planned to move to Oklahoma, the men decided to hang the painting at the Augusta law offices until Thompson could pay the balance.

By Wednesday, the painting had been paid for and was released to the heritage center.

Law firm partner and state Sen. Roger Katz, an Augusta Republican, joked that he and his clients had enjoyed having the painting in the office so much they were tempted to try to keep it.

Shettleworth said Bailey was born in Portland in 1832, the son of a prominent auctioneer, and was first known for his landscape paintings.

Bailey owned, trained and raced horses in Maine and, at age 55, attended veterinary school and became what is now known as the Maine state veterinarian.

“He is an important Maine artist, and it’s really wonderful Steve has been able to find and locate this painting and bring it back to the state,” Shettleworth said.

Clark Thompson said Bailey was known for encouraging Maine farmers to breed horses. He said in Bailey’s time, Maine became known for the high quality of what are now known as standardbred horses, which weren’t as fast as thoroughbreds but raced at a trotting pace and were versatile enough not only to race but to provide transportation and be used as working horses. He said each year Maine farmers would bring their horses to places like Silver Street in Waterville and trot them up and down the street for wealthy summer visitors, some of whom purchased the horses to race themselves.

The King William painting shows the horse standing in front of a wall with the time 2.22½ written in the upper right corner, which Clark Thompson said was likely the horse’s fastest trotting time in a mile-long race.

Stephen Thompson said he plans to lend the painting to institutions, such as Kennebec Savings Bank, which donated to the acquisition, and have a secure place where it can be displayed for the public. He is also open to giving educational presentations on the topic throughout the state.

He said there were more than 100 racetracks for trotters in Maine at one time with up to three in Augusta, including one at the current site of the Kennebec Valley YMCA.

“It is my belief a lot of this history is being forgotten,” Stephen Thompson said. “That’s one of our missions. To ensure we’re able to capture and preserve that information for the people of Maine. If we’re going to revitalize harness racing in Maine, we need to find a way to capture the imagination of Maine people.”