A family painting of a long-gone square-rigger that has hung in the parlor of an old West Tisbury house for as long as anyone can remember, took a trip this week to San Francisco, to a new permanent home. The painting of the ship Niantic will now reside in the city where the actual ship has rested, most of it burned and buried, for 159 years. The painting will soon be on permanent display in the San Francisco Maritime Museum, which houses a collection of artifacts from the lost ship.

The painting leaves behind a trail of Vineyard stories that circle the globe. The painting once belonged to a whaler, Capt. Henry Cleaveland, the ship’s captain. It has passed down through the generations, always in the same house, and came into the hands of Cynthia Riggs, the present owner, through her mother, Dionis Coffin Riggs.

A champagne reception for the departing painting was held Sunday afternoon, in the 1750 Cleaveland House. Cynthia Riggs, her two sisters, Ann Fielder and Alvida Jones, and a host of relatives and friends honored the moment.

David Hull, a principal librarian with the San Francisco Maritime Museum, who came to take the painting on the 2,800-mile trip by air, was treated like royalty on a sunny May day. “I feel this is like the joining of two bookends,” he told the Gazette.

About 30 years ago, a much younger Mr. Hull traveled to West Tisbury to meet with Dionis Coffin Riggs to pick up the ship’s log from the Niantic. It was the last time he had been to the house and the last time he had visited the Vineyard. The Niantic is a celebrated ship in San Francisco, he said.

There was plenty of reason for celebration in the old Cleaveland House on Sunday. Ms. Riggs, a Vineyard mystery writer, spent the winter having the 17-by-24-inch painting restored by restorer Ian Primrose of Falmouth. And along the way she learned much about the painting, the ship and her heritage.

The idea of turning the painting over to the museum came up recently, when Ms. Riggs discovered that the painting had been done in China in the 19th century.

“When I realized how valuable that painting is, I didn’t want it in the house,” she said. It is a China trade painting, painted sometime between 1836 and 1840 in Whampoa, China, a port in the outskirts of a city known today as Guangzhou, northwest of Hong Kong.

“We don’t know how the painting got from San Francisco to the Cleaveland House,” Ms. Riggs said. “But it was probably put in the house in 1860, when my great-grandfather James Cleaveland modernized the house.” James was Henry’s son, and both were accomplished captains. James served under his father aboard the Niantic as first mate; he kept the Niantic log book.

Mr. Hull said the Niantic, built in 1833 in Connecticut for the China trade, is believed to be one of many ships that arrived in the city around the time of the gold rush in 1849, and were made into storage buildings. “There weren’t enough buildings in the growing city,” he said.

In 1848 the Niantic came under the command of Capt. Henry Cleaveland and sailed from Warren, R.I., for the Pacific on a whaling expedition.

While the ship was in Peru, Ms. Riggs said the captain learned there was money to be made by helping transport thousands of Americans stuck in Panama, trying to get to California to search for gold.

In a quick decision, the captain decided to transport some 250 people to San Francisco.

When it reached San Francisco, the ship, like many others, was abandoned by the crew. The Niantic was the first of 44 vessels to be hauled ashore for use as a store ship in August of 1849. “She lasted in this role only until the great fire of May 1851, when she was burned down to the mud line,” according to a National Park Service report.

In 1978 the Niantic was rediscovered during the excavation for the Mark Twain Complex, next to the Transamerica Building. A plaque commemorates the ship and the location: “The emigrant ship Niantic stood on this spot in the early days when the water came up to Montgomery Street.” The plaque continues:

“The fire of May 3, 1851, destroyed all but the submerged hulk which later was used as the foundation for the Niantic Hotel, a famous hostelry which stood until 1872. This tablet was placed by the Historic Landmarks Committee of the Native Sons of the Golden West, Sept. 19, 1919.”

The Riggs family painting of the Niantic will now join an exhibit at the museum of parts of the ship’s hull and rudder that were recovered in 1978. The ship’s log, donated to the museum by Dionis Coffin Riggs, is also part of the exhibit.

On Sunday at the Cleaveland House even the champagne had significance. Ms. Riggs explained that when archeologists uncovered the remnants of the Niantic in 1978, they found many bottles of champagne in what remained of the hull. One of the recovered bottles was given to her mother, as a gift in exchange for the log book.

Mr. Hull said the discovery of champagne in the ship’s hull wasn’t all that surprising, but was further evidence of the period in history when the ship was used as a gold rush store.