Scott Hartley, a retired sergeant for the York County Sheriff’s Office and active member of Orchard Masonic Lodge No. 215, died Sunday after a brief fight with cancer. He was 50.

Mr. Hartley attended the University of Maine in Orono and the Maine Police Academy in Waterville, according to his obituary. He then joined the Army and served with its Military Police unit for four years.

He worked for the Saco and the Old Orchard Beach police departments. In the late 1980s, he joined the York County Sheriff’s Office as a corrections officer. He worked there for about 10 years, then joined the Federal Bureau of Prisons in Ayer, Massachusetts. He stayed for two years before returning to the sheriff’s office. He worked at the York County Jail, where he rose through the ranks to sergeant.

Eugene O’Neill, a longtime friend and sergeant at the Scarborough Police Department, said Mr. Hartley was widely respected among fellow officers and inmates.

“He was a very fair guy,” O’Neill said. “He actually cared about the inmates. He didn’t look down at them. He saw the good in them. He spent time talking to the inmates and trying to help them.”

He retired a couple of years ago during his struggle with colon cancer.

Mr. Hartley was a loving father of two children, Chase Hartley, 18, and Josette Hartley, 15, both of Old Orchard Beach. O’Neill said Mr. Hartley attended as many of their school events as he could. He noted they recently made a trip to Washington, D.C., and he was teaching his daughter how to drive.

“The thing he cared most about was his two kids,” O’Neill said. “He spent as much time with them as he could.”

Mr. Hartley, of Old Orchard Beach, was remembered by friends this week as a good man who had a positive outlook on life. O’Neill talked about their friendship Thursday, noting that Mr. Hartley spent the holidays with his family.

“He was like a brother to me,” O’Neill said. “I admired his kindness. He really cared about people a lot.”

Mr. Hartley was an active member of Orchard Masonic Lodge No. 215. He also attended St. Margaret’s Roman Catholic Church – Good Shepherd Parish in Old Orchard Beach.

“He was proud to be a Mason,” O’Neill said.

Mr. Hartley was diagnosed with colon cancer a few years ago. O’Neill said he underwent surgery to remove the tumor, but the cancer returned and metastasized.

“He was a fighter,” O’Neill said. “He didn’t want to give up. He never complained. This man… he was always in a good mood. Every day was a good day. His main concern was his kids.”

The Masons from Orchard Lodge No. 215 will gather to honor and celebrate Mr. Hartley’s life at 2 p.m. March 7 at the Saco Masonic Lodge, 252 Main St. in Saco.

Honor guards from the Old Orchard Police Department, the York County Sheriff’s Office and the Army will be on hand during his services.