RED LION, Pa. (AP) — Three Pennsylvania detectives shot to death last week while attempting to arrest a stalking suspect were remembered at their funeral Thursday as exemplary officers and devoted family men.

The service for Northern York County Regional Police detectives Cody Michael Becker, Mark Edward Baker, and Isaiah Emenheiser was held more than a week after they were ambushed by a man who had been inside the home of a woman he was accused of stalking.

“They were gentle, they were kind,” Northern Regional Chief David L. Lash recalled in a eulogy. “They confronted some of the most evil human behaviors imaginable. And not only did they face those challenges, they did so while holding fast to faith, compassion and uncompromising honor.”

Hundreds of police officers mourned them at Living Word Community Church in Red Lion, Southeastern Pennsylvania, after a motorcade brought their flag-draped caskets from a funeral home.

Lash called the three the best of us, saying their sacrifice is a solemn reminder of the cost of service but also the courage required to stand in the face of darkness.

Autopsy results released this week indicated that all three officers died of multiple gunshot wounds.

A prosecutor said the stalking suspect, 24-year-old Matthew James Ruth, fired on the officers as they opened the door to the woman’s home. Two other officers were seriously wounded. York County District Attorney Tim Barker believes Ruth, who died in an exchange of gunfire, had planned to ambush the woman he was accused of stalking.

Becker, 39, a resident of Spring Grove, had been a star multisport athlete in high school. Baker, 53, who lived in Dover, was a computer forensics investigation specialist. Emenheiser, 43, of York, was a perfectionist aspiring to open a gym.

Becker served as sergeant of detectives and had been on the Northern Regional force for 16 years. His obituary recounted how in 2010 he climbed to the second story of a burning building to catch children who were escaping through a window. He is survived by a wife and two children. A second service, a public funeral for Becker, will be held Sunday at Spring Grove Area High School in Spring Grove.

Baker was a U.S. Army veteran who spent three years with the Philadelphia Police Department before joining Northern Regional in 2004, first as a patrol officer and later in computer forensics. He was an Eagle Scout with a wife and four children, a fifth child having predeceased him. Emenheiser was a York College criminal justice graduate who served in the U.S. Secret Service before being hired by Northern Regional. He made 104 DUI arrests in 2010 and was named officer of the year, among other honors.

His daughter described him as courageous, fearless, kind, and compassionate. Emenheiser had interests in fitness, home renovations, and youth soccer coaching, leaving behind a wife and two children.

Northern Regional Sgt. Andrew Miller shared how Emenheiser mentored him and offered guidance. Mourners were encouraged to remember the sacrifices and the lives of these heroes.