Richard Harryman was wearing a crisp blue shirt for the occasion, and his hospital bed was in the living room.

There were punch and cookies on a table in the hall, and family and friends were waiting when a car arrived carrying four midshipmen.

Harryman, 85, served in both the Marine Corps and the Air Force. The midshipmen were there to deliver a final salute to a dying veteran.

In a program unique among the service academies, young people from the Naval Academy, on the threshold of their military careers, are visiting veterans at the end of their lives to acknowledge their service as only another member of the military can.

"Detail, cover," senior Kimberly Bernardy barked gently, and in unison the mids pulled their hats from beneath their arms and slowly put them in place.

"Detail, ready. Present arms," she said, and they slowly raised their hands in salute. Eyes straight ahead, still as statues, the midshipmen looked sharp and somber in their dark dress uniforms.

Harryman, more alert than he had been for some time, lifted his pale hand to return the salute.

"I feel like I have my military family with me," he said, barely above a whisper. His real family — wife, Jean, and his daughters Diane Gray and Deborah Rolig — rolled from tears to smiles and back again during the ceremony.

"From a future Marine to a Marine," said Bernardy, who will join the Corps when she graduates in May. She bent close to be sure that he heard her. "I thank you for your service."

Four years ago, Bernardy presented the Naval Academy brass with the idea. She was volunteering with Hospice of the Chesapeake, and the organization was looking for a meaningful way to honor veterans in its care.

"We were the perfect fit," she said.

"Kim is the champion of the program," said Michael McHale, president of Hospice of the Chesapeake, which serves Anne Arundel and Prince George's counties. "The program grew under her tutelage.

"It is those who are just entering their military service and those who are exiting. These are private, tender moments."

It began with Bernardy and a couple of other midshipmen on Saturdays in November four years ago, in honor of Veterans Day.

The program, renamed the Honor Salute, is now year-round and has grown to include more than 140 midshipmen volunteers who have visited more than 50 veterans in hospice, hospitals, nursing homes and their own homes to offer a sign of respect and a sincere thank-you.

"These are members of the 'greatest generation,' and they are leaving us," said Bernardy, from Highland, Calif.

"It is incredibly difficult sometimes," she said. "It's not like I don't cry in the formation or cry in the car. But it is our duty before they leave to say, 'Good work,' and to thank them."

More than 16 million Americans served in World War II, and it is estimated that they are dying at the rate of about 555 a day. A little over a million survive, and that number does not include veterans from Korea and Vietnam.

"I am so very proud of the men and women who participate in this act of giving back by honoring our veterans," said Naval Academy Superintendent Vice Adm. Michael Miller. "The Final Salute program is a wonderful opportunity for our midshipmen to pay the ultimate respect to those who have bravely served before them."

"I think it is outstanding," said Peter Gaytan, executive director of the American Legion in Washington. As a member of the Air Force stationed at Dover Air Base, he was part of the honor guard that welcomed home more than 250 fallen service members.