MINNEAPOLIS (WCCO) — Giovanni Williams will serve 20 years in prison after a plea deal was reached Tuesday in the murder of Dattreas Stewart last December at a Brooklyn Center gas station.

The Hennepin County Attorney’s office says Williams, 24, admitted in court to fatally shooting Stewart, 45, in a vehicle outside of a Pump N Munch gas station in a drug-related robbery.

READ MORE: Vaccine Doubts Fuel Dr. Scott Jensen's Rise In Minnesota Governor Race

The criminal complaint states that officers found Stewart, from Brooklyn Center, and his girlfriend in a car at the gas station on the night of Dec. 11. The woman was screaming and applying pressure to a bullet wound on his head. Stewart was pronounced dead at the scene.

READ MORE: 'Perfect Timing To Go': MEA Marking One Of The Busiest Travel Weekends Of The Fall

The victim’s girlfriend told police she set up a deal to sell $300 worth of marijuana to someone through a mutual connection outside of the gas station. Williams arrived at the meet, entered Stewart’s back seat and asked to smell the pot.

In court, Williams said he then pulled out a gun, and Stewart did, too. Williams said he then shot Stewart in the head out of fear. Williams also admitted his intention was to rob him.

MORE NEWS: A Ride-Along With Minneapolis Police Shows How Staffing Shortages Have Officers Stretched Thin

Williams, who is from Minneapolis, pleaded guilty to intentional second-degree murder Tuesday, and will be officially sentenced on Oct. 19.