Steven DuBois / The Associated Press

PORTLAND — Four military veterans whose cremated remains sat unclaimed for decades in Oregon’s state-run mental hospital were laid to rest Wednesday in Willamette National Cemetery.

Val Conley, the deputy director of the state Department of Veterans’ Affairs, accepted the United States flag on behalf of the men whose relatives could not be located. They were Army Pvt. James Butler, Army Sgt. William Madson, Navy Boatswain’s Mate 2nd Class Frank Martin and Navy sailor Lanier Johnson, whose rank is unknown.

Madson and Johnson served in World War I; the others served just before or during World War II.

Almost nothing is known about the lives they led.

From the late 1800s to the 1970s, the unclaimed bodies of 3,600 patients were cremated, and the remains stored in copper canisters. There were no names on the urns, only numbers that corresponded to the identities of patients in hospital records.

The canisters, many of them corroded, were discovered in a storage room in 2004.

The disrespectful treatment of the ashes spurred lawmakers to replace the crumbling Oregon State Hospital — the place where the movie “One Flew Over the Cuckoo’s Nest” was filmed — and establish an online database to help people find the remains of their forgotten relatives. Only about 100 canisters have been claimed, Robert Yde, a state hospital spokesman, said.

The state Department of Veterans’ Affairs figured some of the unclaimed ashes might be former soldiers, and asked for a list of names. The identities were sent to the St. Louis office of the U.S. Department of Veterans Affairs. Workers there did a line-by-line check and could only identify five military men with certainty.

“Because the record keeping was so terrible back then, it was a struggle for us to figure out who was a veteran and who was not,” Conley said.

The imprecision of the records became evident Monday, when it was learned that one of the five veterans had been claimed by relatives after his death in 1962 and has been buried for five decades near Coos Bay. It’s unknown whose ashes are in the canister that had been identified as his.

At Wednesday’s ceremony, following a procession of Patriot Guard Riders and a half-dozen cars, Conley sat alone in a row of chairs reserved for family. The folded flag she accepted will be displayed in a case at the Veterans’ Building in Salem.

“I think about those guys sitting down in that cold, dark basement for 50 years and nobody claiming them,” she said. “It saddens me. It saddens me there was no family.”