They served in the Civil War, the Indian Wars, the Spanish-American War and World War I — but for decades, their ashes and those of thousands of others lay abandoned in corroded urns in an outbuilding at Oregon's state psychiatric hospital.

The Oregon National Guard on Friday offered a rifle salute and played Taps at Willamette National Cemetery to honor 19 veterans and the spouses of two others who were patients at the now 132-year-old hospital and died there.

Their cremated remains were discovered a decade ago, along with those of about 3,500 other people.

Dubbed the "forgotten souls," they became a symbol of the state's dark history of treating the mentally ill at Oregon State Hospital, where "One Flew Over the Cuckoo's Nest" was filmed.

"We are finally laying to rest the veterans and spouses whom time and society had forgotten," hospital superintendent Greg Roberts said at the ceremony.

The military honors are part of an effort to pay respect to those who died, to reunite their remains with surviving relatives and to honor those eligible with a veteran burial.

Lawmakers discovered the urns by chance while on a tour of the dilapidated hospital in 2004. Senate State President Peter Courtney, who found the canisters, said he did not want these people to be forgotten.

Thus far, the hospital has identified about 90 eligible veterans among the remains. It handed four of the urns to the Oregon Department of Veteran Affairs three years ago, and they were interred. Since then, the state identified an additional 88 remains eligible for a burial with military honors.

Between 1914 and 1971, more than 5,000 people were cremated at the hospital. They were born in different states and countries. Most were patients at the state psychiatric hospital, while others died at other institutions.

Courtney and other lawmakers pushed to fund a respectful way to honor the remains and to replace the existing psychiatric hospital.

Using records and genealogy research, the hospital identified most of the dead and four years ago published their names in an online database.

The hospital has matched 302 urns with families. A total of 3,348 still have not been claimed.

Last summer, the hospital unveiled a memorial on its grounds to honor the unclaimed remains.

Those who served the country would be honored and buried like other veterans.

At the cemetery, Mike Allegre of the state's Department of Veterans' Affairs read the roll call of names. Four had served in the Civil War, six in the Spanish American War, six in the Indian Wars and two in World War I.

A bagpiper played Amazing Grace. The National Guard twice fired their rifles in the still, gray morning.

No eulogies were given; the men's records are sparse. Some had a mental illness or were dealing with post-war traumas, while others were admitted to receive better medical care.

Arthur B. Hunter was a private in an Indiana infantry regiment that served in the Union Army during the American Civil War. Hunter was born in Kansas in 1877. He never married, and died in 1931 at age 54.

John Q. Howard served in the Spanish American War and is listed as a cook in Company C in the 2nd Regiment Muster in Eugene in 1898. He was born in Iowa in 1859, and died in Oregon in 1926 at 67.

John Wilson Sevedge was a farmer and a private in Company A, 1st Brigade of the Oregon Militia. Records indicate he fought in the Modoc Indian War in the early 1870s. Sevedge was born in Illinois 1858, and died in 1935.

Curtis Lufate Oaks is a veteran of World War I. Documents note he served in the U.S. Army in 1917 and was honorably discharged in May 1919. According to his file, he had a scar from a gunshot wound received during the war. Oaks, who was born in Tennessee in 1895, never married and died in Oregon in 1955 at age 60.

The urns with the remains of those four men, along with 17 others, will be interred in a memorial wall at the cemetery. The remains of 70 other veterans will be interred at a future date.