A teenager has admitted that when he was 15 he drove behind a motorist heading home from a St. Paul grocery store and killed her with a gunshot to the head at random.

Melvin D. Williams, of St. Paul, agreed to plead guilty Friday in Ramsey County District Court to second-degree murder during a drive-by shooting in connection with the killing of 34-year-old Yuliya "Julia" Li on Feb. 16, 2022.

The plea agreement between the defense and the prosecution calls for Williams to receive a sentence of no more than 32 years and two months. Under the deal, the defense reserves the right to seek a lesser term. Sentencing is scheduled for Sept. 7.

If Williams receives the maximum allowed under the plea agreement, he could expect to serve about 20 years in prison and the balance on supervised release.

Williams was arrested soon after the shooting and charged initially by what is called a juvenile petition. The case was later moved to adult court, clearing the way for the potential of a lengthy stint in prison.

Police have said it appeared Li was targeted at random and did nothing to provoke the violence.

In 2007, Li moved from Kazakhstan to study at the University of Minnesota, where she earned a bachelor's degree in economics and global studies.

She left the Twin Cities to work in brand management and marketing for General Electric and Procter & Gamble before returning to St. Paul in 2016 to pursue a master's degree in business administration from the University of St. Thomas. Li joined H.B. Fuller in a marketing role in July 2017, and most recently worked as a global business director.

According to the criminal complaint, which cited video images and other evidence:

Police were called about 6:40 p.m. to the 1000 block of Payne Avenue on St. Paul's East Side, where they saw Li slumped over in the driver's seat of her SUV, which was still running and with the gear in drive. Officers saw she was shot in the head. Li was pronounced dead at Regions Hospital less than an hour later.

Li had been heading home from a grocery store, where she bought food for a dinner party. Williams' car was behind her SUV and moved closer as she waited to turn left from northbound Payne onto Cook Avenue. As Li started her turn, "a muzzle flash from the driver's side" of the car was captured on video.

Williams sped north on Payne and entered his home in the 1200 block of Hazelwood Street. He was first arrested and incarcerated in Hennepin County, where he has been accused of other crimes as well. Because of his age at the time, state law prevents disclosure of those allegations.