PIERRE, S.D. — Three law officers killed last year were among the fallen members of South Dakota law enforcement honored Wednesday in a ceremony that drew officers from across the state.

A bagpipe player performed "Amazing Grace" and trumpeters sounded taps as those gathered paid tribute to the 66 officers who died in the line of duty in the state the past 125 years.

The event started at a memorial near the state Capitol that lists the names of fallen law officers. Special mention was made of a state corrections officer and two Rapid City police officers who were all killed last year.

Corrections officer Ronald "R.J." Johnson, 63, died in April 2011 at the hands of two inmates who tried unsuccessfully to escape the South Dakota State Penitentiary in Sioux Falls. Rapid City police officers James Ryan McCandless, 28, and Nick Armstrong, 27, died after being shot last August in a confrontation with a man who also died.

Gov. Dennis Daugaard, who spoke later at a Pierre church for the conclusion of the memorial event, said Americans should thank law officers who are willing to risk their lives to keep people safe. He said when he visited South Dakota troops in Afghanistan a couple of weeks ago, he had to wear a helmet and body armor everywhere he went.

"When I got back to South Dakota I was reminded how lucky I was to live in a place like South Dakota, like America, where we can go about our business safely because law enforcement is there to maintain a civilized society and keep us safe and give us freedom because of that safety," Daugaard said.

A service similar to the one in which the governor spoke was held Wednesday in Bismarck to honor the 61 North Dakota law officers who have died in the line of duty in that state's history. The North Dakota service paid tribute to Bismarck Police Sgt. Steve Kenner, who was shot last July while responding to a domestic disturbance, and Burleigh County Sheriff's Deputy Bryan Sleeper, who suffered a heart attack at the scene of an arrest last September.

The annual services in both states were held a week early because relatives and friends are going to Washington, D.C., next week for a national memorial service.

In South Dakota, more than 100 officers and others gathered on a sunny day as a wreath was placed at the memorial near the Capitol. An honor guard of seven officers carrying rifles then fired three rounds apiece.

Daugaard noted that last year's ceremony featured a special tribute to Johnson, the prison guard, who was killed just weeks before that ceremony. Much of the governor's speech Wednesday focused on the two Rapid City officers.

McCandless and Armstrong died of injuries after being shot while performing what authorities have described as a routine stop in Rapid City, a community on the eastern edge of the Black Hills. Officer Tim Doyle, 39, also was shot but returned to work a few weeks later.

According to a report, the officers stopped a group of people who appeared to be intoxicated, and Daniel Tiger pulled a gun and began shooting. Tiger was shot by the officers and died later.

Daugaard said Tiger may have hurt other people if the officers had not stopped him.

"I believe other people would have been hurt or possibly may have died from bullets in that gun if the officers had not responded," he said.

Rapid City Police Chief Steve Allender said such ceremonies are difficult but help people heal.

"It's a sad time. We miss our guys every day," Allender said. "I just wonder how long it's going to linger in our hallways. I don't think all of our employees have recovered."

During the service in the church, officers and family members placed blue carnations on a table to honor the fallen officers as South Dakota Attorney General Mary Jackley read the names of all officers who have died in more than a century.

McKenzie Armstrong, a brother of Officer Nick Armstrong, said the ceremony was a reminder of the support the officers' families are receiving from people across South Dakota.