HIRAM — The Maine National Guard honored four veterans from the same family Thursday, long after their military service had ended and long after they had been buried together in Pleasant Ridge Cemetery in Hiram.

Stephen Lyons, of Cape Elizabeth, had conducted genealogical research into his family, continuing work that his father, a World War II veteran, started years ago. He uncovered a long history of U.S. military service in his family dating back to the Revolutionary War.

The Maine Military Honors Program, which conducts military honors ceremonies for deceased veterans who were discharged honorably, conducts about a dozen such ceremonies a year for veterans who have been long dead. However, it never had conducted four such ceremonies at once within one family.

“In 10,000 times of doing this, this is the first,” said Maj. Michael Steinbuchel, of the Maine National Guard. He said it’s not unusual to have several members of one family serve in the military, but it is unusual for them all to be buried in one rural cemetery.

“We were so pleased we were able to provide this unique service,” he said.

One of Lyons’ grandfathers served in World War I. The other served in the Maine National Guard before World War I, and an uncle made a career in the Navy. All of them, and Lyons’ father, were buried in the same hilltop cemetery in Hiram without military honors.

Lyons discovered other veterans in the family had been buried in Maine and elsewhere, also without receiving their due recognition.

Lyons said the Maine National Guard contacted its Maine Military Funeral Honors Program after he told them of his discoveries.

“They immediately asked if I would like to honor the veterans of my family,” Lyons said. “We are eternally grateful to the Maine National Guard.”

In Thursday’s ceremonies over each grave, the National Guard fired a three-round volley, played taps and folded and presented flags for each of the four men to Lyons’ older brother, Francis W. Lyons Jr.

“My father set the foundation for this with the research he did,” Lyons said. “It was a gift he gave to his family.”

Stephen Lyons, a retired Westbrook police detective who had served in the Marine Corps, has added to the volumes of family history that his father started, collecting military records, medals, stories and photos of dozens of family members who served in the military over the years.

Lyons’ father, Francis W. Lyons Sr., enlisted in the Navy shortly after the bombing of Pearl Harbor and went on to serve in notable battles, including the Battle of Okinawa.

“He never talked about World War II,” Lyons said. His father, a devout Christian, returned to raise a family and went on to become a selectman in Hiram.

One of Lyons’ grandfathers, Laurence Gray, served in the Navy aboard the USS Utah during World War I.

His other grandfather, Francis E. Lyons, joined the Maine National Guard as an Irish immigrant at the age of 18 and served from 1909 to 1912.

An uncle, Navy Lt. Donald Gray, rose through the ranks as an enlisted man and retired after a military career as an officer. He served during both the Korean and Vietnam wars.

“Our family is not unlike many other families around the country who have sacrificed so much and asked so little,” Lyons said. “I think it’s important for our family to understand not just that they were veterans, but that they were people who made a commitment to their country and their family.”

Military funeral honors are now an entitlement for all veterans who were discharged honorably under federal law, prompting the creation of the Maine Military Funeral Honors Program in 2003.

The entitlement has no expiration, and family members of deceased veterans can contact the program at any time after the veteran’s death to request a ceremony.

National Guard Staff Sgt. Scott Wright said the program honors about a dozen veterans each year in Maine who have been long dead and were buried without military honors.

“It’s becoming more common,” Wright said. “People in Maine are still finding out about this.”

In total, the Maine National Guard performed 1,254 graveside ceremonies for deceased veterans in 2012. It has 1,177 scheduled for this year.

During the busy summer months, up to 32 National Guardsmen serve in the program full time, in addition to Wright, three training sergeants and one civilian.

Wright said Lyons also has located the gravesites of more veterans in his family in South Portland and Bath.

“We will be doing those later on. We haven’t set a date,” Wright said.