A 33-year-old man has admitted to the fatal shooting outside an Amazon warehouse in Lakeville of a pregnant woman whose son was born that same day, only to die nine days later.

Donte R. McCray of St. Louis Park agreed this week in Dakota County District Court to plead guilty to two counts of second-degree murder involving a drive-by shooting in connection with the Jan. 8 shooting of 31-year-old Kyla O'Neal.

In exchange for McCray's plea, prosecutors agreed to dismiss two counts of second-degree murder with intent.

The plea agreement calls for Harris to receive a sentence of more than 47 years.

With credit for the time he's been in jail, McCray is expected to serve more than 30 years in prison and the balance on supervised release. In the meantime, McCray remains jailed ahead of sentencing, which is scheduled for Dec. 12.

County Attorney Kathy Keena said Thursday her office had filed a notice indicating its intention to present the case to the grand jury for consideration of first-degree murder charges.

"However," Keena said, "with the consent of the victim's family, we opted to resolve the case with a consecutive sentence on two counts of murder in the second degree."

Their son, Messiah Edward O'Neal, was born that same night by Caesarean section at HCMC, but "after [Messiah] had been on life support for several days with little to no brain activity, the difficult decision was made to disconnect life support," the criminal complaint read.

A news release from the Hennepin County Medical Examiner's Office listed Messiah's age at the time of death as "9 days, 3 hours, 27 minutes." The cause of death, the Examiner's Office said, was not from being hit by gunfire but complications from his mother being shot.

O'Neal, whose survivors include three children, was shot about 6:50 p.m. while sitting in a vehicle in the parking lot of the Amazon Fulfillment Center in the 9800 block of 217th Street W. She died at HCMC that night. McCray was quickly arrested.

Police spoke at the scene with McCray, who acknowledged he and O'Neal had been arguing about him having a child with another woman while O'Neal was pregnant, the criminal complaint read.

Also, McCray allegedly told O'Neal he would kill her if she ever had another man around the kids, the complaint said.