AUGUSTA, Maine — The Civil War soldier from Maine whose remains were stored haphazardly at the Oregon State Hospital for nearly 100 years has finally come home.

Army Pvt. Jewett Williams of Hodgdon, who fought for the Union Army with the famed 20th Maine, made his second stop in the Pine Tree State on Monday afternoon when the small, American flag-wrapped cardboard box holding his cremains arrived at the Togus VA Medical Center in Augusta. It will not be the end of his journey, though.

A pair of distant cousins from Aroostook County have stepped forward to claim Williams’ ashes. He will be laid to rest beside his parents in the family plot in Hodgdon, according to VA officials.

“Can we all have a big round of applause for Pvt. Jewett Williams finally making his way home to Maine?” asked Adria Horn, director of the Maine Bureau of Veterans Services, during a short ceremony outside the hospital here. “He’ll go back where he began his journey. It really is a remarkable story and a fitting tribute.”

Williams’ ashes traveled across the country in style, accompanied by a battalion of Patriot Guard Riders who handed the box off from one group of motorcyclists to the next like a kind of modern-day Pony Express. Many of those riders came to Togus on Monday to witness Williams’ cremains being handed over to Maine VA officials, including Neil Wagner of Royersford, Pennsylvania.

“When I found out they were bringing a Civil War veteran, I said, ‘I can’t miss this one.’ I could be part of history,” he said. “It was very humbling. Every time he was handed off to a different guard group there were tears shed because he was getting closer to home.”

Christabell Rose, who is part of the Falmouth-based Maine Living History Association, dismounted from one of the Patriot Guard Riders’ motorcycles Monday while wearing a wide-skirted 1860s-style dress. After taking off her helmet, she bundled her hair into a black snood. Rose had traveled with Williams’ cremains from Appomattox, Virginia, organizing ceremonies at state line crossings all the way up to Maine.

More than 150 Patriot Guard Riders participated in the Maine ceremony in Kittery, which took place after riders dismounted and carried his ashes across the Piscataqua River on the Memorial Bridge. The nonprofit motorcycle organization was formed to attend funeral services of American veterans as invited guests of the family.

“He was celebrated on his way home,” she said. “The love and support outside the state of Maine was just phenomenal.”

That’s a big change for the former Union soldier, who died at the Oregon hospital in 1922, with no one to claim his remains.

Williams had a tough time during the Civil War and lived a peripatetic life after it, according to Tom Desjardin, a historian and recent acting commissioner of the Maine Department of Education.

“As the war came closer to the end, they fought more and more often,” Desjardin said. “The 20th Maine was in the piece of the army that literally chased General Robert E. Lee west.”

Afterward, Williams came back to Maine, married and then got divorced about five years later. He remarried and left the state, Desjardin said, moving with his wife to Michigan, Minnesota, Colorado, Washington state and then Oregon. They had six children, although one died as a child, and the couple divorced in 1899 “at her insistence,” Desjardin said.

Williams was among veterans who spoke at school Memorial Day programs from 1914 to 1919, according to the Statesman Journal.

Census records from 1920 list Williams as a widower who was still working as a laborer at age 75, according to the Oregon newspaper. He was sick and suffering from dementia when he was admitted to the state hospital in 1922. He died three months later at age 78.

His ashes were placed in a copper urn and kept in various locations on hospital grounds along with those of more than 3,000 other people who died at the hospital between 1914 and 1971 and whose remains were never claimed, the Statesman Journal said.

Desjardin learned that the 20th Maine veteran’s ashes were in Oregon when he was researching what had happened to each soldier who fought in the regiment. He proposed the state bring Williams home.

“I discovered that his remains were in a can on a shelf in a shed out in Oregon and had been there for 94 years, unclaimed,” the historian said. “Back home is better than a shelf on a shed in Oregon.”

Togus officials had planned to open up the long-closed national cemetery on the medical center’s grounds and bury him near five other 20th Maine veterans. But when Williams’ elderly relatives — first cousins four times removed — asked to have him come home, Horn said hospital authorities were happy to comply. The relatives, who did not attend the Monday ceremony, sent a letter proving their relationship to Williams, she said.

The decision to allow Williams to be buried in Hodgdon was not unanimously cheered by attendees on Monday. One woman challenged Horn, asking whether there is proof the Hodgdon cousins are related to Williams. Another said that the Army had become Williams’ family.

“He was very proud of being a soldier,” Rose said. “That’s why it would be very appropriate for him to be laid to rest with his brothers-at-arms. With his military family.”

But that will not happen.

“I know there’s a lot of people who are disappointed,” Horn said. “But the family has the best, the right and always the highest priority. Cemeteries have their purpose, but we would never object to the family’s wishes.”

Williams’ remains will be kept at the Maine Veterans Memorial Cemetery on the Mount Vernon Road in Augusta until Saturday, Sept. 17, when the remains will be taken to Aroostook County. The public can come and pay tribute to him while he is at the Augusta Cemetery, according to the VA.