Two days before the three-year anniversary of his estranged girlfriend's death, a 41-year-old former Ohio man pleaded guilty to second-degree murder in the York City slaying.

As the court was preparing to move forward with jury selection for a trial Tuesday, Julio Angel Gonzalez-Pagan admitted to killing the mother of his two children.

Common Pleas Judge Michael E. Bortner sentenced him Tuesday to life in prison without a chance of parole for the shooting death of 33-year-old Jessica Morales on Nov. 15, 2009.

There were delays in the case's procedure as Gonzalez had been repeatedly ruled mentally incompetent to stand trial and held in Torrance State Hospital near Pittsburgh.

But in March, a psychiatrist determined Gonzalez-Pagan is competent to stand trial, according to prosecutors.

York City Police said Morales left Gonzalez several weeks before she was killed, taking her children from Ohio and moving to her sister's home in the 500 block of South Court Street. The couple had been together for eight years.

Gonzalez-Pagan said he was having stress-related issues when Morales left, and that he had been on medication but stopped taking it, lead Detective Andy Baez has said.

Baez said Gonzalez-Pagan paid a friend to drive him to York because he believed Morales was seeing another man.

When Gonzalez-Pagan got to Court Street, Morales told him she wanted to start a new life without him, police said. According to Baez, the man said he lost control and shot Morales in the head and chest.

Gonzalez-Pagan then began to hug and kiss the unresponsive Morales, asking for her forgiveness, Baez said.